CentOS configures firewall operation instances (start, stop, open, and close ports): Note: basic firewall operation command: query firewall status: [root @ localhost ~] # Serviceiptablesstatus & lt; press enter & gt; stop firewall: [root @ localhost ~] # Service & nbsp
CentOS configures firewall operation instances (enable, stop, enable, and disable ports ):
Note: basic firewall operation commands:
Query the firewall status:
[Root @ localhost ~] # Service iptables status <回车>
Stop firewall:
[Root @ localhost ~] # Service iptables stop <回车>
Start firewall:
[Root @ localhost ~] # Service iptables start <回车>
Restart firewall:
[Root @ localhost ~] # Service iptables restart <回车>
Permanently disable the firewall:
[Root @ localhost ~] # Chkconfig iptables off <回车>
Enable after permanent shutdown:
[Root @ localhost ~] # Chkconfig iptables on <回车>
1. view the firewall status
[Root @ localhost ~] # Service iptables status <回车>
2. edit the/etc/sysconfig/iptables file. Port 8080 and Port 9990 must be enabled in our instance.
Open/etc/sysconfig/iptables in the editor
4. Save the/etc/sysconfig/iptables file and run the command on the terminal.
[Root @ localhost ~] # Service iptables restart <回车>
5. view the firewall status again
[Root @ localhost ~] # Service iptables status <回车>
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.