27: Configuring firewall 
_______________________________________________________________________________________________________ 
_____________________________________________________________________________________________________ 
© Virtual Access 2017 
GW1000 Series User Manual 
Issue: 1.9    Page 254 of 350 
27.3  Configuring firewall using UCI 
27.3.1  Firewall general settings 
To set general (default) settings, enter: 
uci add firewall defaults    
uci set firewall.@defaults[0].syn_flood=1 
uci set firewall.@defaults[0].drop_invalid=1 
uci set firewall.@defaults[0].input=ACCEPT 
uci set firewall.@defaults[0].output=ACCEPT 
uci set firewall.@defaults[0].forward=ACCEPT 
Note: this command is only required if there is no defaults section. 
27.3.2  Firewall zone settings 
To set up a firewall zone, enter: 
uci add firewall zone 
uci set firewall.@zone[1].name=lan 
uci set firewall.@zone[1].input=ACCEPT 
uci set firewall.@zone[1].output=ACCEPT 
uci set firewall.@zone[1].forward=ACCEPT 
uci set firewall.@zone[1].network=lan1 wifi_client 
uci set firewall.@zone[1].family=any 
uci set firewall.@zone[1].masq_src=10.0.0.0/24 
uci set firewall.@zone[1].masq_dest=20.0.0.0/24 
uci set firewall.@zone[1].conntrack=1  
uci set firewall.@zone[1].masq=1 
uci set firewall.@zone[1].mtu_fix=1 
uci set firewall.@zone[1].log=1 
uci set firewall.@zone[1].log_limit=5 
27.3.3  Inter-zone forwarding 
To enable forwarding of traffic from WAN to LAN, enter: 
uci add firewall forwarding 
uci set firewall.@forwarding[1].dest=wan 
uci set firewall.@forwarding[1].src=lan