How to Start/Stop or Enable/Disable firewalld on CentOS 7. It has support both for IPv4 and IPv6 firewall settings. Also, it supports Ethernet bridges and allow you to separate between runtime and permanent configuration options. Finally, it supports an interface for services or applications to add firewall rules directly. In previous CentOS versions, we used to stop iptables service by using the command service iptables stop or /etc/init.d/iptables stop On newly shined CentOS 7 / Red Hat 7, with systemctl command we can control the service status.
Problem: iptables resets to default settings after server reboot. I'm trying to set rule like this: iptables -I INPUT -p tcp -dport 3000 -j ACCEPT after that I do: service iptables save and it writes back something like this iptables: Saving firewall rules to /etc/sysconfig/iptables: OK and after this I just ran (this was done once): chkconfig iptables on (I have read that this has to be done in order to restore settings after reboot) After that I reboot and run this command: systemctl list-unit-files grep iptables and I see that iptables.service is enabled, however, the rule (to open port 3000) does not work anymore. How do I persist these settings? Maybe a script like this would have been helpful to anyone?