Step 2: log on to the centos system using ssh or the root user with the highest privilege on the local machine, run & ldquo; iptables-F & rdquo; and confirm. After the command is confirmed, no success prompt is displayed. Step 2: run the & ldquo; serviceiptablessave & rdquo; command again and confirm. When & ldquo;
Step 2: log on to the centos system by using ssh or directly using the root user with the highest permissions on the local machine, run "iptables-F", and confirm.
After the command is confirmed, no success prompt is displayed.
Step 2: run the "service iptables save" command again and confirm the operation. if the message "iptables: Saving firewall rules to/etc/sysconfig/iptables: [OK]" is displayed, the operation is successful.
This step is to run the iptables-F command in the first step of this article, but the command is successfully executed, but it has not yet taken effect, so we need to restart the firewall.
Step 2: run the "service iptables restart" command and make sure that the firewall is initialized and restarted when four OK messages are displayed.
Run the "/etc/init. d/iptables status" command to view information about the current centos firewall. after initialization, there are only two or three firewall rules by default.
Step 2: to modify the port, use vi to edit the firewall configuration file "vi/etc/sysconfig/iptables,
Enter the port to be opened and run the Restart command again!