Just some random stuff, not a real configuration

UCI forwarding

Create forwarding rule

uci add firewall redirect
#cfg3b3837
uci set firewall.@redirect[-1].dest=dmz_pub
uci set firewall.@redirect[-1].dest_ip=172.16.10.20
uci set firewall.@redirect[-1].dest_port=22
uci set firewall.@redirect[-1].enabled=1
uci set firewall.@redirect[-1].name=test1
uci set firewall.@redirect[-1].proto=tcp
uci set firewall.@redirect[-1].src=wan
uci set firewall.@redirect[-1].src_dport=2222
uci set firewall.@redirect[-1].target=DNAT
uci commit firewall

uci show firewall.@redirect[]
firewall.cfg3b3837=redirect
firewall.cfg3b3837.dest='dmz_pub'
firewall.cfg3b3837.dest_port='22'
firewall.cfg3b3837.name='test1'
firewall.cfg3b3837.proto='tcp'
firewall.cfg3b3837.src='wan'
firewall.cfg3b3837.target='DNAT'
firewall.cfg3b3837.dest_ip='172.16.10.21'
firewall.cfg3b3837.src_dport='2223'

Delete forwarding rule

uci delete firewall.cfg3b3837
uci commit firewall

UCI firewalling

irewall.@rule[10]=rule
firewall.@rule[10].target='ACCEPT'
firewall.@rule[10].name='VPN'
firewall.@rule[10].src='lan'
firewall.@rule[10].src_ip='10.14.23.0/24'
firewall.@rule[10].proto='all'

config rule
        option target 'ACCEPT'
        option name 'VPN'
        option src 'lan'
        option src_ip '10.14.23.0/24'
        option proto 'all'
  • project/omnia/firewall.txt
  • Last modified: 2017/04/04 20:48
  • by embargo