CentOS Configuration Firewall Operation instance (start, stop, open, closed port):
Note: The basic operation of the firewall command:
Querying firewall Status:
[[Email protected] ~]# service iptables status< carriage return >
To stop the firewall:
[[Email protected] ~]# service iptables Stop < Enter >
To start the firewall:
[[Email protected] ~]# service iptables start < Enter >
To restart the firewall:
[[Email protected] ~]# service iptables Restart < Enter >
To permanently shut down the firewall:
[[email protected] ~]# chkconfig iptables off< Carriage return >
Enable after permanent shutdown:
[[email protected] ~]# chkconfig iptables on< Carriage return >
1. View firewall status
[[Email protected] ~]# service iptables status< carriage return >
2, edit the/etc/sysconfig/iptables file. We're going to open 8080 ports and 9990 ports in our instance.
Open/etc/sysconfig/iptables with editor
4. Save the/etc/sysconfig/iptables file and execute it at the terminal
[[Email protected] ~]# service iptables Restart < Enter >
5. New view of firewall status
[[Email protected] ~]# service iptables status< carriage return >
6, this time, the server's 8080 and 9990 ports can provide services to the outside.
7, other ports open mode is similar to the open mode.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
CentOS Configuration Firewall Operation instance (start, stop, open, closed port)