Centos 7 Save Iptables Settings
Answer : Solution 1: Disable firewalld by the following command: systemctl disable firewalld Then install iptables-service by following command: yum install iptables-services Then enable iptables as services: systemctl enable iptables Now you can save your iptable rules by following command: service iptables save Solution 2: CentOS 7 is using FirewallD now! Use the --permanent flag to save settings. Example: firewall-cmd --zone=public --add-port=3000/tcp --permanent Then reload rules: firewall-cmd --reload Solution 3: On CentOS 7 Minimal you may need to install the iptables-services package (thanks to @RichieACC for the suggestion): sudo yum install -y iptables-services And then enable the service using systemd : sudo systemctl enable iptables.service And run the initscript to save your firewall rules: sudo /usr/libexec/iptables/iptables.init save Solution 4: iptables-save > /etc/sysconfig/iptables will save the current configuration wi...