+ -
当前位置:首页 → 问答吧 → [CentOS] IP tables 已经加入3306 端口,但外部访问不了

[CentOS] IP tables 已经加入3306 端口,但外部访问不了

时间:2011-08-08

来源:互联网

[root@centos-0 ~]# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Mysql在本机访问操作是没有问题的,但使用其它机器访问就提示连接不了,使用telnet 3306 端口也提示连不通。
关闭iptables后,外部访问是正常的。

请问是为什么?

作者: lanxe   发布时间: 2011-08-08

补充:系统 CentOS 6

作者: lanxe   发布时间: 2011-08-08

相关阅读 更多

热门下载

更多