Basic operational commands for firewalls
Query firewall status: [[email protected] ~]# service iptables status< carriage return >
Stop firewall: [[email protected] ~]# service iptables Stop < Enter >
Start firewall: [[email protected] ~]# service iptables start < Enter >
Restart firewall: [[email protected] ~]# service iptables Restart < Enter >
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
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
3, according to gourd painting scoop, we add 8080 ports and 9990 ports
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.
CentOS Configuration Firewall Operation instance (start, stop, open, closed port)