This article mainly explains how to configure the firewall in the Centos system, I hope it will be helpful to everyone. |
Basic operating commands of the firewall
1. Query the firewall status:
[root@localhost ~]# service iptables status
2. Enable the firewall:
[root@localhost ~]# service iptables start
3. Turn off the firewall:
[root@localhost ~]# service iptables stop
4. Restart the firewall:
[root@localhost ~]# service iptables restart
5. Turn off the firewall permanently:
[root@localhost ~]# chkconfig iptables off
6. Turn on the firewall after permanent shutdown:
[root@localhost ~]# chkconfig iptables off
Replenish
Edit the /etc/sysconfig/iptables file to configure different ports to provide external services.