6

I have added many rich rule with something like this:

 firewall-cmd --permanent --zone="thezone" --add-rich-rule='rule family=ipv4 source address=1.2.3.4 reject'

And now I would like to clear/remove all those rich rules in my "thezone" zone.

Also y try to remove line for line with :

 firewall-cmd --permanent --zone="thezone" --remove-rich-rule='rule family=ipv4 source address=1.2.3.4 reject'

or

 firewall-cmd --permanent --zone="thezone" --remove-rich-rule='rule family=ipv4 source address=1.2.3.4 accept'

or

 firewall-cmd --permanent --zone="thezone" --add-rich-rule='rule family=ipv4 source address=1.2.3.4 accept'

with the firewall-cmd --reload and still haven't succeed.

Can Anyone tell me how to clear all or tell what i'm doing wrong with one by one method?

Mik
  • 83

1 Answers1

5

Empty the contents of (or remove):

  • /etc/firewalld/zones/zone.xml
  • /etc/firewalld/zones/zone.xml.old

Note: where zone is the name of the zone you need to remove.

Then restart the firewalld service