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 14:20] admin [Use-case] |
template:howto_tpl [2018/05/24 09:05] (current) |
||
---|---|---|---|
Line 33: | Line 33: | ||
* **Add something** | * **Add something** | ||
<code> | <code> | ||
- | ... | + | uci add network rule |
+ | uci set network.@rule[-1].interface=wan | ||
+ | uci set network.@rule[-1].target=84.141.4.210 | ||
+ | uci set network.@rule[-1].netmask=255.255.255.255 | ||
+ | uci set network.@rule[-1].gateway=172.27.0.1 | ||
</code> | </code> | ||
* **Store changes** | * **Store changes** | ||
<code> | <code> | ||
- | uci commit xxx | + | uci commit network |
</code> | </code> | ||
* **Apply changes** | * **Apply changes** | ||
<code> | <code> | ||
- | /etc/init.d/xxx restart | + | /etc/init.d/network restart |
</code> | </code> | ||
==== UCI config files (native) ==== | ==== UCI config files (native) ==== | ||
- | Feature is defined in [[documentation:configuration:config_files:config_file_involved|/etc/config/config_file]] | + | Routes are defined in [[documentation:configuration:config_files:config_network|/etc/config/network]] |
- | * **New something** | + | * **Add new rule-section** |
<code> | <code> | ||
- | config 'something' | + | config 'route' |
- | option 'name' 'whatever' | + | option 'interface' 'wan' |
- | | + | option 'target' '83.141.4.210' |
+ | option 'netmask' '255.255.255.255' | ||
+ | option 'gateway' '172.27.0.1' | ||
</code> | </code> | ||