This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
template:howto_tpl [2015/05/11 12:34] admin |
template:howto_tpl [2018/05/24 09:05] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
===== Overview ===== | ===== Overview ===== | ||
+ | |||
+ | ==== Level of difficulty === | ||
+ | |||
+ | Easy | ||
==== Use-case ==== | ==== Use-case ==== | ||
Line 9: | Line 13: | ||
If someone wants to add a new howto, this might safe some work. | If someone wants to add a new howto, this might safe some work. | ||
- | ==== Level of difficulty === | + | ^ proberties of scenario ^^ |
- | + | | some propertie | some value | | |
- | Easy | + | | some other propertie | some other value | |
+ | | ... | ... | | ||
==== Related topics ==== | ==== Related topics ==== | ||
* [[documentation:configuration:uci|UCI]] | * [[documentation:configuration:uci|UCI]] | ||
- | * [[documentation:configuration:config_files:config_firewall|/etc/config/firewall]] | + | * [[documentation:configuration:config_files:config_files_involved|/etc/config/config_file]] |
| | ||
===== Instructions ===== | ===== Instructions ===== | ||
Line 26: | Line 31: | ||
==== UCI Config System ==== | ==== UCI Config System ==== | ||
- | * **Add redirect to firewall** | + | * **Add something** |
<code> | <code> | ||
- | uci add firewall rule | + | uci add network rule |
- | uci set firewall.@rule[-1].name='some awsome game' | + | uci set network.@rule[-1].interface=wan |
- | uci set firewall.@rule[-1].src=wan | + | uci set network.@rule[-1].target=84.141.4.210 |
- | uci set firewall.@rule[-1].proto=tcp | + | uci set network.@rule[-1].netmask=255.255.255.255 |
- | uci set firewall.@rule[-1].src_dport=2222 | + | uci set network.@rule[-1].gateway=172.27.0.1 |
- | uci set firewall.@rule[-1].dest_ip=192.168.1.100 | + | |
- | uci set firewall.@rule[-1].target=DNAT | + | |
- | uci set firewall.@rule[-1].dest=lan | + | |
</code> | </code> | ||
* **Store changes** | * **Store changes** | ||
<code> | <code> | ||
- | uci commit firewall | + | uci commit network |
</code> | </code> | ||
* **Apply changes** | * **Apply changes** | ||
<code> | <code> | ||
- | /etc/init.d/firewall restart | + | /etc/init.d/network restart |
</code> | </code> | ||
==== UCI config files (native) ==== | ==== UCI config files (native) ==== | ||
- | Redirects are defined in [[documentation:configuration:config_files:config_firewall|/etc/config/firewall]] | + | Routes are defined in [[documentation:configuration:config_files:config_network|/etc/config/network]] |
- | * **New redirect** | + | * **Add new rule-section** |
<code> | <code> | ||
- | config 'redirect' | + | config 'route' |
- | option 'name' 'some awesome game' | + | option 'interface' 'wan' |
- | option 'src' 'wan' | + | option 'target' '83.141.4.210' |
- | option 'proto' 'tcp' | + | option 'netmask' '255.255.255.255' |
- | option 'src_dport' '2222' | + | option 'gateway' '172.27.0.1' |
- | option 'dest_ip' '192.168.1.100' | + | |
- | option 'target' 'DNAT' | + | |
- | option 'dest' 'lan' | + | |
</code> | </code> | ||