Configure Firewall operation instances (enable, stop, enable, and disable ports) in CentOS)
Basic firewall operation commands: [root @ localhost ~] # Service iptables status <press enter> stop firewall: [root @ localhost ~] # Service iptables stop <press enter> Start firewall: [root @ localhost ~] # Service iptables start <press enter> restart firewall: [root @ localhost ~] # Service iptables restart <press enter> permanently disable firewall: [root @ localhost ~] # Chkconfig iptables off <press enter> permanently disable and enable: [root @ localhost ~] # Chkconfig iptables on <press enter> 1. view the Firewall Status. 2. Edit the/etc/sysconfig/iptables file. Open port 8080 and port 9990 in our instance and use the editor to open/etc/sysconfig/iptables 3, add port 8080 and port 9990 4, save the/etc/sysconfig/iptables file, and run [root @ localhost ~] on the terminal. # Service iptables restart <press enter> 5. view the firewall status [root @ localhost ~] # Service iptables status <press enter> 6. At this time, ports 8080 and 9990 of the server can provide external services. 7. The open mode of other ports is similar to the open mode.