when adding 2 sources in firewall-cmd 192.168.10.0/24 and second 192.168.100.0/24 if I try to remove it using the command I do not remove it.
firewall-cmd --zone=localhost --remove-source=192.168.100.0/24;
firewall-cmd --reload
the only way I am able to remove it would be to remove it directly in the .xml file
vi /etc/firewalld/zones/local.xml
You don’t need the semi-colon at the end of the command. The zone is not localhost either (unless you specifically created this since it doesn’t exist by default). You can check and verify which zone they have been added to by doing this first:
firewall-cmd --list-all-zones
If no zone was specified when adding the sources then they will be in the public zone. Also if you want to ensure of removing it permanently, do this:
firewall-cmd --zone=zone-name --remove-source=192.168.100.0/24 --permanent
if you do not specify --permanent
, it will only remove it until the next restart of firewalld - hence most likely the reason it was still in your config file.
Thank you very much, it worked. I apologize, it may be a silly thing, but I’m learning how to use Rock. I’ve been working with the Debian distro for many years and I’m trying to change a little now.