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 ACCEPTBy 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:7199Unfortunately, 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 ACCEPTAny idea on how to fix this? Why is the --permanent option not working correctly?
how to make firewall changes permanent via firewall-cmd?
centos;iptables;firewall;firewalld;iptables persistent
--direct commands cannot be made permanent. Use equivalent zone command:   sudo firewall-cmd --zone=public --add-port=7199/tcp --permanent   sudo firewall-cmd --reloadand to check the result:   sudo firewall-cmd --zone=public --list-all