Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
project:omnia:firewall [2017/04/04 19:59] embargo UCI firewalling |
project:omnia:firewall [2017/04/04 20:18] embargo [UCI forwarding] example config script |
||
---|---|---|---|
Line 3: | Line 3: | ||
==== UCI forwarding ==== | ==== UCI forwarding ==== | ||
<code> | <code> | ||
- | firewall.cfg3b3837=redirect | + | uci add firewall redirect |
- | firewall.cfg3b3837.dest=dmz_pub | + | uci set firewall.@redirect[].dest=dmz_pub |
- | firewall.cfg3b3837.dest_ip=172.16.10.20 | + | uci set firewall.@redirect[].dest_ip=172.16.10.20 |
- | firewall.cfg3b3837.dest_port=22 | + | uci set firewall.@redirect[].dest_port=22 |
- | firewall.cfg3b3837.enabled=1 | + | uci set firewall.@redirect[].enabled=1 |
- | firewall.cfg3b3837.name=test1 | + | uci set firewall.@redirect[].name=test1 |
- | firewall.cfg3b3837.proto=tcp | + | uci set firewall.@redirect[].proto=tcp |
- | firewall.cfg3b3837.src=wan | + | uci set firewall.@redirect[].src=wan |
- | firewall.cfg3b3837.src_dport=2222 | + | uci set firewall.@redirect[].src_dport=2222 |
- | firewall.cfg3b3837.target=DNAT | + | uci set firewall.@redirect[].target=DNAT |
- | + | uci commit firewall | |
- | --------------------------------------------------------------- | + | |
- | + | ||
- | firewall.@redirect[0]=redirect | + | |
- | firewall.@redirect[0].enabled='1' | + | |
- | firewall.@redirect[0].target='DNAT' | + | |
- | firewall.@redirect[0].src='wan' | + | |
- | firewall.@redirect[0].dest='dmz_pub' | + | |
- | firewall.@redirect[0].proto='tcp' | + | |
- | firewall.@redirect[0].src_dport='2222' | + | |
- | firewall.@redirect[0].dest_ip='172.16.10.20' | + | |
- | firewall.@redirect[0].dest_port='22' | + | |
- | firewall.@redirect[0].name='test1' | + | |
- | + | ||
- | -------------------------------------------------------------- | + | |
- | + | ||
- | config redirect | + | |
- | option target 'DNAT' | + | |
- | option src 'wan' | + | |
- | option dest 'dmz_pub' | + | |
- | option proto 'tcp' | + | |
- | option src_dport '2222' | + | |
- | option dest_ip '172.16.10.20' | + | |
- | option dest_port '22' | + | |
- | option name 'test1' | + | |
</code> | </code> | ||