On the journey of exploring the newly releaed CentOS 7 . I found another interesting thing. This is related to iptables. 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.
To start/stop/restart/reload the iptables on CentOS 7 / RHEL 7 , follow the given below steps
Step 1 : Install iptables-services
yum install iptables-services
Step 2 : Manage iptables with systemctl
Use the below given syntax
systemctl [stop|start|restart|reload] iptables
Example.
To start iptables
systemctl start iptables
To stop iptables
systemctl stop iptables
To restart iptables
systemctl restart iptables
To reload iptables
systemctl reload iptables
We strongly suggest to use firewalld instead of iptables.
Leave a Reply