I have set up several rule groups in the firewall config file (/etc/config/firewall):
config rule
option src 'lan'
option dest 'wan'
option family 'ipv4'
option src_ip '192.168.1.123'
option target 'REJECT'
option name 'BlockThem'
By default, this rule is enabled. If I'd add
option enabled '0'
to this config section, the given rule is not activated (after the firewall restart, of course).
Time to time I am accessing my router remotely and enabling/disabling certain rules, by opening the config file and manually adding or removing the "option enabled" line, and then restarting the firewall. It's kind of pain and I am looking for a less tedious way.
So, I am looking for something like
$ firewall config list rules
$ firewall config enable rule "BlockThem"
$ firewall config disable rule "BlockThem"