一.
service iptables stop 臨時關閉,
chkconfig iptables off完全關閉
service iptables status狀態,
service iptables start/restart 開啟/重啟防火牆
二.
輸入命令
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
iptables -I INPUT -p tcp --dport 6379 -j ACCEPT
來開放相關端口,分別是
XShell連接22 , 本地80, mysql 3306,tomcat 8080, redis 6379