-
检查端口号是否开启
/etc/init.d/iptables status
-
开放端口号
Nginx端口号:80 MySQL端口号:3306 Tomcat端口号:8080[root@root ~]# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT [root@root ~]# /etc/init.d/iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] [root@root ~]# service iptables restart iptables:将链设置为政策 ACCEPT:filter [确定] iptables:清除防火墙规则: [确定] iptables:正在卸载模块: [确定] iptables:应用防火墙规则: [确定]
网友评论