OpenWRT cli command


uci set network.wan.proto=static
uci set network.wan.ipaddr=192.168.152.5
uci set network.wan.netmask=255.255.255.0
uci set network.wan.gateway=192.168.152.1
uci set network.wan.dns=8.8.8.8
uci add_list network.wan.dns=8.8.4.4 //(второй dns)//
uci commit


uci add firewall rule
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=22
uci commit firewall
uci add firewall rule

uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=80
uci commit firewall

Comments are closed.