Common commands for Linux firewalls
1. Permanent effect, no recovery after reboot
Open: Chkconfigiptables on
OFF: Chkconfigiptables off
2. Immediate effect, recovery after restart
Restarting the firewall
Way One:/etc/init.d/iptables restart
Mode two: Service iptables restart
To turn off the firewall:
Mode one:/etc/init.d/iptables stop
Mode two: Service iptables stop
Start the firewall
Mode one:/etc/init.d/iptables start
Mode two: Service iptables start
Open related interfaces
1. Locate the firewall configuration file and modify
Directory in/etc/sysconfig/iptables
Add the line code to the inside, the code is as follows:
-A rh-firewall-1-input-p tcp-m state–state new-m tcp–dport 8088-j ACCEPT
This code must be placed above the following code
-A rh-firewall-1-input-j reject–reject-with icmp-host-prohibited, otherwise it will not work. Specific configuration files such as:
2. Restart the firewall for changes to take effect
Service Iptables Restart
Linux under the firewall to open a port number and firewall common command use