how to make firewall changes permanent via firewall-cmd?
6
votes
3
answers
34572
views
I am trying to open some ports in CentOS 7.
I am able to open a port with the following command:
firewall-cmd --direct --add-rule ipv4 filter IN_public_allow 0 -m tcp -p tcp --dport 7199 -j ACCEPT
By inspecting via
iptables -L -n
, I get the confirmation that the setting was successful:
Chain IN_public_allow (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7199
Unfortunately, I cannot make the changes permanent. Even by using the --permanent
option like this:
firewall-cmd --direct --permanent --add-rule ipv4 filter IN_public_allow 0 -m tcp -p tcp --dport 7199 -j ACCEPT
Any idea on how to fix this? Why is the --permanent
option not working correctly?
Asked by fstab
(920 rep)
Dec 21, 2014, 03:19 PM
Last activity: Nov 1, 2020, 08:33 PM
Last activity: Nov 1, 2020, 08:33 PM