In the CENTOS virtual machine installed APACHE is not available, depressed, the solution is as follows/sbin/iptables-IINPUT-ptcp -- dport80-jACCEPT/sbin/iptables-IINPUT-ptcp -- dport22-jACCEPT and then save: /etc/rc. d/init. d/iptables & n
APACHE cannot be installed on CENTOS of a virtual machine. the solution is as follows:
/Sbin/iptables-I INPUT-p tcp -- dport 80-j ACCEPT
/Sbin/iptables-I INPUT-p tcp -- dport 22-j ACCEPT
Then save:
/Etc/rc. d/init. d/iptables save
After the computer is restarted, ports 80 and 22 are enabled by default.
You may not restart the computer either here:
/Etc/init. d/iptables restart
Close the firewall and close its services:
View firewall information:
/Etc/init. d/iptables status
Disable the firewall service:
/Etc/init. d/iptables stop
Permanently Close? I don't know how to use the permanent method:
Chkconfig-level 35 iptables off