0

Am trying to delete a firewall rule that i added using firewall-cmd, the rule with source “0.0.0.0/0” below:

[root@localhost firewalld]# firewall-cmd –zone=external –list-all
external
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh
ports:
protocols:
forward: yes
masquerade: yes
forward-ports:
source-ports:
icmp-blocks:
rich rules:
rule family=”ipv4″ source address=”0.0.0.0/0″ port port=”22″ protocol=”tcp” accept

Am using the command below to try and remove this rule:

[root@localhost firewalld]# firewall-cmd –remove-rich-rule ‘rule family=”ipv4″ source address=”0.0.0.0/0″ port port=22 protocol=tcp accept’ –permanent
Warning: NOT_ENABLED: rule family=”ipv4″ source address=”0.0.0.0/0″ port port=22 protocol=tcp accept
success

This results in a warning and success!, but the rule is not deleted even after reloading the firewall service. I also tried stop/start of the firewall service, and also disable/enable all in vain.

I also see the same warning when i check firewalld status:

Spread the word:
Tech Junction Asked question May 27, 2023