Solve the problem that iptables does not exist in CentOS 6.6,/etc/sysconfig /.
In the latest CentOS 7 linux system, changing the default firewall to firewalld replaces the previous iptables firewall. How can I enable the iptrables firewall again? This article will show you how to delete the existing firewalld firewall? How to install the iptables firewall before CentOS 7:
Disable firewalld firewall in CentOS 7
First, stop the firewalld service and enter the following command:
1 $ sudosystemctl stop firewalld. service
Disable the firewalld service from automatically starting when the system starts. Enter the following command:
1 $ sudosystemctl disable firewalld. server
If you will not use the firewalld service in the future, you can directly uninstall it and use the following command:
1 $ sudoyum remove firewalld-yCentOS 7 install iptables Firewall
To install the iptables package, run the following command:
1 $ sudoyum install iptables-services
Set the iptables Firewall Service to automatically start when it starts up. Enter the following command:
1 $ sudosystemctl enable iptables
If you want to use/etc/init. d/iptables save command to save the modified firewall policy. Enter the following command to save iptables. the init script overwrites the script after iptables is installed. Enter the following command:
1 $ sudo/usr/libexec/iptables. init/etc/init. d/iptables
In this case, you can run the/etc/init. d/iptables save command.
1 $ sudo/etc/init. d/iptables save