想搭个服务器,但外面访问不到,是防火墙的原因,把端口设置一下就行。
1.在/etc/sysconfig/iptables里添加


-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT


[root@localhost ~]# /etc/init.d/iptables restart


[root@localhost ~]# /etc/init.d/iptables status
想搭个服务器,但外面访问不到,是防火墙的原因,把端口设置一下就行。
1.在/etc/sysconfig/iptables里添加
转载于:https://www.cnblogs.com/joe-yang/archive/2008/09/18/1293053.html