From LedHed's Wiki
(Created page with "== Overview == Some useful CLI commands for OpenWRT == Packages == === Update Package List === opkg update === Install Package === opkg install nano === Remove Package...") |
(No difference)
|
Latest revision as of 23:14, 2 December 2020
Contents
Overview
Some useful CLI commands for OpenWRT
Packages
Update Package List
opkg update
Install Package
opkg install nano
Remove Package
opkg remove nano
Firewall
Firewall Config File
/etc/config/firewall
Enable/Disable firewall rule
uci set firewall.@rule[xxx].enabled=0
Where xxx = the rule number
Firewall Rule Example
/etc/config/firewall
config rule option target 'ACCEPT' option src 'wan' option proto 'tcp' option dest_port '22' option name 'WAN SSH'
Reload the firewall after a change
fw3 reload
Reference
https://forum.openwrt.org/t/how-to-enable-disable-a-traffic-rule-from-the-shell/22611
https://openwrt.org/docs/guide-user/base-system/uci
https://openwrt.org/docs/guide-user/firewall/firewall_configuration