What's the difference between "firewall-cmd --reload" and "systemctl restart firewalld"?
Hope everyone who will answer this to have a great day!
What's the difference between "firewall-cmd --reload" and "systemctl restart firewalld"?
Hope everyone who will answer this to have a great day!
systemctl restart firewalld
will kill the process and start a new one.firewall-cmd --reload
willEvery configuration without the
--permanent
flag is a runtime configuration andAs pointed out by @mircea-vutcovici reloading the firewall rules with firewall-cmd will not cause the system to use a potential new firewalld executable if it has been updated since the last restart of the daemon. However depending on your distribution that might have been done by the package manager when the package has been updated. The documentation states:
The
killall -HUP firewalld
step is executed when runningsystemctl reload firewalld
. Looking at the basic design of firewalld it is essentially a frontend toiptables
or similar backends. So killing the firewalld process should not affect the actual firewall rules. So both ways of reloading the firewalld rules have the same effect. I would personally prefer the systemd way for the sake of making sure that the most recent firewalld executable is used.