I. Open/Close firewall command under Linux
1) Permanent, no recovery after reboot
Open: Chkconfig iptables on off: chkconfig iptables off2) immediate effect, restart after recovery on: Service iptables start off: Service iptables stop need to explain is the Other services under Linux can be turned on and off using the commands above. When the firewall is turned on, do the following settings, open the relevant port, modify the/etc/sysconfig/iptables file, add the following:-a rh-firewall-1-input-m State--state new-m tcp-p TCP--DP ORT 80-j accept-a rh-firewall-1-input-m State--state new-m tcp-p TCP--dport 22-j ACCEPT
Two. Ubuntu off firewall
Iptables-a Input-i! Ppp0-j ACCEPT
Three. CentOS Linux firewall configuration and shutdown
Execute the "Setup" command to start the text mode configuration Utility, select "Firewall Configuration" in "Select a tool", then select the "Run Tool" button, the firewall configuration interface, "Security level" set to "disabled", and then choose OK.
or with a command:
#/sbin/iptables-i input-p tcp–dport 80-j ACCEPT
#/sbin/iptables-i input-p tcp–dport 22-j ACCEPT
#/etc/rc.d/init.d/iptables Save
When you restart your computer, the firewall defaults to 80 and 22 ports
This should also be done without restarting the computer:
#/etc/init.d/iptables restart
To turn off the Firewall service:
Linux firewall and port switch settings