Four-faith router cli setting guide


                         
Four-faith router cli setting guide


The four-faith router provide nvram command to configure the router, it contain all the setting items as webpage configure.

nvvram supported command:

1.  nvram get item_name
This command is used to get the current value of the specified item
eg:  
nvram get lan_ip
lan_ip:192.168.1.1

2.  nvram set item_name  value
This command is used to set value of the specified item
eg:
nvram set lan_ip 192.168.47.1

3.  nvram show
    This command is used to show all the settings
4.  nvram commit
    This command is used to save the current settings to flash
5.        nvram reboot
this command is used to reboot the router



all items are listed as the following

lan_ip: lan  ip address
lan_netmask: lan netmask
lan_mac: lan mac address
web_port: web configure port
serial_app_dsc_addr: serial application server address
serial_app_dsc_port: serial application server listening port
serial_app_device_id: serial application device identity number
serial_app_hrt_interval: serial application heart packet detect interval
access_no: wireless wan access number
apn: wireless wan access point name
wan_user: wireless wan username
wan_pswd: wireless wan password
wan_ip_type: wireless wan local ip address allocate method   1 – auto  2 – fixed ip
wan_detect_mode: wireless wan alive detect method  1-- none 2 – ping  5 --- ppp  6 – route
wan_detect_interval: wireless wan alive detect interval
wan_detect_icmp_dst: wireless wan icmp detect host address
wan_detect_icmp_dst2: wireless wan icmp detect second host address
wan_way:  wan access method  0 – pppoe  1--- wireless wan  2 – static ip  3 --- dhcp client

fixed_wan_ip: wireless wan fixed local ip address
ddns_enable: enable or disable ddns(dynamic domainname service) function . 1 – enable 0--disable
ddns_provider: ddns service provider name. 1 – 88ip 2 – 3322   3 – dyndns
ddns_host: ddns service host address
ddns_bkhost: ddns service backup host address
ddns_interval: ddns update time interval
ddns_user: ddns username
ddns_pswc: ddns password
pptp_enable: enable or disable pptp  1 – enable   0 – disable
pptp_fixed_ip: pptp fixed local tunnel ip address

debug_enable: enable or disable log information 1 – enable  0 – disable
debug_type: debug information output way   1 – console  2 – syslog
debug_syslog_server_ip: syslog server ip address
admin_user: administrator login username
admin_pswd: administrator login password

dhcpd_enable: enable or disable dhcpd function 1 – enable  0 – disable
dhcpd_start_ip: dhcpd ip address pool start ip
dhcpd_end_ip: dhcpd ip address pool end ip
pptp_server_addr: pptp server address
pptp_user: pptp login username
pptp_pswd: pptp login password
pptp_enable: enable or disable pptp-client function 1 – enable  0 – disable
wan_dns_type:  get dns server way  1 – auto  2-- fixed dns server 
wan_main_dns:  fixed main dns server ip address
wan_aux_dns: fixed second dns server ip address
dmz_enable: enable or disable dmz function  1 – enable 2—disable
dmz_ip: dmz host ip address

workmode:  router workmode   3 – normal workmode  2 – enable serial application mode
serial_app_proto:  1 – UDP  2 – PUREUDP 3-- TCP  4-- PURETCP
wifi_enable: enable or disable wifi function
wifi_ssid:  wifi ssid name
wifi_region: wifi region
            1 – africa
            2 – asia
            3 – australia
            4-- canada
           5 – europe
         6 – france
         7 – israel
 8 – japan
9-- mexico
10 – south america
11-- united states
   
wifi_channel: wifi work channel

wifi_speed_mode: wifi speed mode
          0 – 802.11b only
          1 – 802.11g only
          2 – 802.11b/g

wifi_auth_mode: wifi authentication way
     0 – none
    1 – wep
     2 – wpapsk
     3 – wpa2psk
    4 – wpapskwpa2psk


wifi_wep_auth_type: wep authentication way
          0 – open
          1 – share
           2 – auto
wifi_wep_passwd:  wep authentication password
wifi_wpa_encry_type: wpa authentication way
    3 – TKIP
    4 – AES
    5 – AUTO
wifi_wpa_passwd: wpa authentication password
nat_item: nat item
   nat_item=index name outside_port inside_port port_num proto localip
       index: nat item location ,start from 0
      name: name of this nat item
      outside_port:  destination port of the remote ip packet
     inside_port:  forwarding local port
port_num:  ports range should be forward (refer to the router manual)
proto:
     1 – all
     2 – tcp
     3 – udp
  eg:
     nvram set nat_item "0 nat1 5001 5001 1 2 192.168.1.130"

     nvram get nat_item
   nat_item:nat_item=0 nat1 5001 5001 1 2 192.168.1.130

pf_enable: enable or disable packet filter   1 – enable  0 – disable
pf_policy:  packet filter policy
    1  – discard the packet in the filter list, accept all others
    2  – only accept packet in the filter list ,discard all others

pf_item: packet filter item
pf_item=index srcip srcport dstip dstport dir proto
  index: packet f ilter item location ,start from 0
  srcip: packet source ip address
  srcport: packet source port number
  dstip: packet destination ip address
  dstport: packet destination port number
  dir :   packet transmit direction
      1 – input
      2 – output
      3 – both direction
  proto:
      1 – all
     2 – tcp
     3 – udp
 eg:

    nvram set pf_item “0 * * * 5001 2 2”

     nvram get pf_item
    pf_item:pf_item=0 * * * 5001 2 2
  the empty option should replaced by  *

mac_enable: enable or disable mac filter function  1 – enable  0 – disable

mac_policy: mac filter policy
   1  – discard the packet in the filter list, accept all others
    2  – only accept packet in the filter list ,discard all others
mac_item: mac filter item
mac_item=index mac_addr

  index : filter item location ,start from 0
  mac_addr: the mac address

eg:
nvram set mac_item “0 00:11:22:22:44:D0”
nvram get mac_item
mac_item:mac_item=0 00:11:22:22:44:D0




serial_app_baudrate: serial application baudrate
1 – 110
2 – 300
3 – 1200
4 – 2400
5 – 4800
6 – 9600
7 – 19200
8 – 38400
9 – 57600
10 – 115200
11 – 230400


serial_app_databit: serial application databit
1 – 8 bit
2 – 7 bit
3 – 6 bit
4 – 5 bit

serial_app_parity: serial application parity
1 – none
2 – odd
3 – even
serial_app_stopbit: serial application stopbit
1 – 1bit
2 – 2bit

ddns_3322_host:  3322.org ddns server hostname

ddns_3322_domain: 3322.org  ddns  domainname
l2tp_enable: enable or disable l2tp client function  1 – enable  0 – disable
lns_addr: l2tp server address
l2tp_user: l2tp login username
l2tp_pswd: l2tp login password
l2tp_ip_type:  l2tp client ip address allocation way
  1 – auto
  2 – fixed
l2tp_fixed_ip:  l2tp fixed ip address
route_time: static route item
//route_item=index name dst mask gw metric
index: static route item location ,start from 0
name: static route name
dst: destination address
mask: netmask
gw:  gateway
metric: metric value

eg:
   nvram set route_item “0 1 192.168.3.0 255.255.255.0 192.168.1.130 3”
  nvram get route_item
  route_item:route_item=0 1 192.168.3.0 255.255.255.0 192.168.1.130 3

wan_trig_type: wan online trig type (wireless wan valid)
1 – phone call trig
2 – sms trig
3 – above two methods mixed trig
wan_call_trig_no: wan call trig online phone number
wan_sms_trig_no: wan sms trig online phone number
wan_sms_trig_ctx: wan sms trig online content
wan_online_last_time:  wan online last time

ipsec_natt: enable or disable nat-traversal funciton
ipsec_debug: enable or disable ipsec debug information output
ipsec_natt_detect_interval:  nat-traversal keepalive detect interval
ipsec_dpd_interval: ipsec dead peer detection interval
ipsec_dpd_timeout: ipsec dead peer detection timeout value
ipsec_item: ipsec item


index: ipsec item location ,start from 0
name: ipsec item name
peer_addr:  peer endpoint address


ipsec_item=index name peer_addr peer_id peer_subnet auth_way auth_pswd through pfs_enable ike_alg ipsec_alg ike_life ipsec_life local_id local_subnet

peer_id: peer endpoint id
peer_subnet: peer endpoint protect subnet
auth_way:  authentication way
auth_pswd: authentication password
through: ipsec next route  interface
pfs_enable: pfs enable or disable
ike_alg:  ike algorithm
ipsec_alg: ipsec algorithm
ike_life:  ike life time
ipsec_life: ipsec life time
local_id: local id
local_subnet: local protect subnet


eg;
nvram set ipsec_item “0 ff_tun_1 120.42.46.98 @peer 192.168.47.0/24 0 12345 0 0 1 1 3600 28800 @local 192.168.1.0/24”

nvram get ipsec_item
ipsec_item:ipsec_item=0 ff_tun_1 120.42.46.98 @peer 192.168.47.0/24 0 12345 0 0 1 1 3600 28800 @local 192.168.1.0/24

gre_item: gre item

//gre_item=index name enable through peer_addr peer_net peer_tun_ip local_tun_ip             local_tun_mask gre_pswd keepalive_enable keepalive_interval

index: gre item location ,start from 0
name: gre item name
enable: gre  item enable or disable
  1 – enable
  0 – disable
through: gre next route interface
0 – wireless wan
1 – lan
2 – wan
peer_addr: gre peer endpoint address
peer_net: peer protect subnet
peer_tun_ip: peer gre tunnel ip address
local_tun_ip: local gre tunnel ip address
local_tun_mask: local gre tunnel netmask
gre_pswd: gre password

keepalive_enable: gre keepalive enable or disable
keepalive_tries: gre keepalive try times
keepalive_interval: gre keepalive interval


//gre_item=index name enable through peer_addr peer_net peer_tun_ip local_tun_ip             local_tun_mask gre_pswd keepalive_enable keepalive_interval
eg:
nvram set gre_item “0 gre_tun_1 1 0 120.42.46.98 192.168.8.0/24 200.200.200.1 200.200.200.200 255.255.255.0 123451 5 60”
nvram get gre_item
gre_item:gre_item=0 gre_tun_1 1 0 120.42.46.98 192.168.8.0/24 200.200.200.1 200.200.200.200 255.255.255.0 123451 5 60

apcli_enable: enable or disable apclient function  1 – enable  0 – disable
apcli_remote_ssid: remote AP ssid
apcli_remote_mac: remote AP mac address
apcli_ip_type:  apclient ip address allocation way   1 – auto,  2 – fixed ip
apcli_fixed_ip:  apclient fixed ip address
apcli_fixed_mask:  apclient interface netmask
:







Popular Posts