Auto Provision Network Parameters
1.1 Wan
# network
api net_wan set {“proto”:”dhcp”}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
proto | string | static | value:dhcp, static, pppoe | |
ipaddr | string | empty | when proto=static, it’s valid. | 220808 |
netmask | string | empty | when proto=static, it’s valid. | 220808 |
gateway | string | empty | when proto=static, it’s valid. | 220808 |
username | string | empty | when proto=pppoe, it’s valid | 220808 |
password | string | empty | when proto=pppoe,it’s valid. Format: 1-64 characters | 220808 |
ac | string | empty | when proto=pppoe,it’s valid,Access Concentrator Format: 0-64 characters | 220808 |
service | string | empty | when proto=pppoe,it’s valid,Service provider name Format: 0-64 characters | 220808 |
peerdns | string | 1 | Remote DNS allowed Format: 1 allowed, 0 not allowed | 220808 |
dns | string | empty | Fixed DNS address, multiple DNS separated by spaces Format: 0-64 characters | 220808 |
macaddr | string | empty | MAC address cloning Format: 0-17 MAC criteria, empty (not set) | 220901 |
vendorid | string | empty | Set the vendorid that OPT 60 sends to the server Format: 0-64 characters, empty (system default) | 221008 |
1.2 Lan
api net_lan set {“ipaddr”:”192.168.100.5″,”netmask”:”255.255.255.0″}
Note: Devices with a platform of netbus should not support this interface, remember!!!!
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
ipaddr | string | IP address, required option, Format: IPv4 address | 220905 | |
netmask | string | Subnet mask, required option Format: IPv4 address | 220905 |
1.3 Route
api net_route set {“routes”:[]}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
routes | array | – | Format [{ROUTEKV}…………….]. , refer to “ROUTEKV”. | 220902 |
ROUTEKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
interface | string | wan | Interface (Basic, Logical) Format:wan lan vpn1 | 221108 |
target | string | – | Destination IP address Format: IPv4 address | 220902 |
netmask | string | – | Subnet Mask Format: subnet mask (IPv4 address) | 220902 |
gateway | string | empty | Via gateway Format: IP address, empty | 220902 |
metric | int | 0 | Number of Leap Points Format: 0-1024 | 220902 |
1.4 DHCP
api net_dhcp set {“start”:100,”limit”:150,”leasetime”:”12h”,”ignore”:1}
Note: Devices with a platform of netbus should not support this interface, remember!!!!
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
start | int | 100 | Starting IP address Format: 1-500 | 220905 |
limit | int | 150 | Maximum number of allocations Format: 1-500 | 220905 |
leasetime | string | 12h | Rental time Format: (1-1000)h | 220905 |
ignore | int | 0 | Disabling services for LAN Format: 0 (not disabled) 1 (disabled) | 220905 |
1.5 firwall rule
api net_firewall rule_set {“rules”:[]}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
rules | array | – | format [{RULESKV}…]. , references “RULESKV” | 220906 |
RULESKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
name | string | null | Name Format: 0-32 characters | 221001 |
proto | string | tcp | protocol Format: tcp udp icmp igmp all | 230609 |
src | string | empty | Source network domain Format: wan lan empty (not specified) | 221108 |
src_ip | string | empty | Source IP or Source Network Format: IP address or IP/CIDR, can be empty, length 0-32 | 221009 |
src_port | string | empty | Source Port Format: single port 1-65536 Multiple ports (1-65536):(1-65536) | 220906 |
dest | string | empty | Destination Network Domain Format: wan lan empty (not specified) | 221108 |
dest_ip | string | empty | Destination IP or Destination Network Format: IP address or IP/CIDR, can be empty, length 0-32 | 221009 |
dest_port | string | empty | Destination Port Format: single port 1-65536 multiple ports (1-65536):(1-65536) | 220906 |
target | string | ACCEPT | Rule Action Format: ACCEPT REJECT DROP | 220906 |
1.6 net_firewall redirect
api net_firewall redirect_set {“redirects”:[]}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
redirects | array | – | Format [{RDRTSKV}…]. , references “RDRTSKV” | 220906 |
RDRTSKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
name | string | null | Name Format: 0-32 characters | 221001 |
proto | string | tcp | protocol Format (radio): tcp udp icmp | 230721 |
src | string | wan | Source Network Domain Format: wan lan | 221108 |
src_dport | string | – | Source Destination Port Format: single port 1-65536 Multiple ports (1-65536):(1-65536), this value is empty when proto is icmp, page label hidden | 230721 |
dest | string | lan | Destination network domain Format: wan lan | 221108 |
dest_ip | string | – | Destination IP Format: IP address | 220906 |
dest_port | string | – | Destination Port Format: single port 1-65536 Multiple ports (1-65536):(1-65536), this value is null when proto is icmp, page label hidden | 230721 |
target | string | dnat | Forwarding Model Format: dnat | 220906 |
1.7 net_alias
api net_alias set {“alias1_device”:””,”alias1_ipaddr”:””,”alias1_netmask”:””,”alias2_device”:””,”alias2_ipaddr”:””,”alias2_netmask”:””}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
alias1_device | string | empty | Bind Interface (Basic) Format: wan, lan, empty | 221108 |
alias1_ipaddr | string | empty | IP Address Format: IP format, 0-16 characters, empty | 220910 |
alias1_netmask | string | empty | Subnet Mask Format: IP format, 0-16 characters, empty | 220910 |
alias2_device | string | empty | Bind Interface (basic) Format: wan, lan, empty | 221108 |
alias2_ipaddr | string | empty | IP Address Format: IP format, 0-16 characters, empty | 220910 |
alias2_netmask | string | empty | Subnet Mask Format: IP format, 0-16 characters, null | 220910 |
1.8 net_vpn
api net_vpn set {“switch”:””,”ovpn_username”:””,”ovpn_password”:””,”ovpn_cert_password”:””,”ovpn_config”:””,”ovpn_status”:”0″,”ovpn_ipaddr”:””,”ovpn_netmask”:””}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
switch | string | empty | VPN Enabled Type Format: openvpn empty (off) | 221109 |
ovpn_username | string | empty | Account Verification Name Format: 0-32 characters, empty | 221109 |
ovpn_password | string | empty | Account Verification Password Format: 0-32 characters, null | 221109 |
ovpn_cert_password | string | empty | cert verify password Format: 0-32 characters, empty | 221109 |
ovpn_config | string | empty | ovpn configuration content Format: 0-32678 characters, empty | 221109 |
1.9 net_switch
api net_switch set {“network_mode”:”route”,”type_list”:[“route”,”bridge”]}
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
network_mode | string | route | Network Mode Format: route/bridge | 230901 |
1.10 acl_web_set
api sys_security acl_web_set {“addresses”:[]}
Note: This program checks the existence of the environment variable client IP address, if there is, addresses list for the empty array does not do anything, otherwise addresses list has the contents of the test to see if it contains the client’s IP, if not, it will report an error.
KEY | VAL | Default | Remark |
---|---|---|---|
addresses | array | [] | Format:[{LISTKV}…],Refer to “LISTKV”, an empty array means empty. Quantity limit sys_info/oem maxacls |
LISTKV | VAL | Default | Remark |
---|---|---|---|
start | string | – | Start Address Format: IPv4 |
end | string | null | end address Format: null means only start, valid IP and in the same range as the start address, when the start address is greater than the end address, the start address is automatically used as the end address |