当我尝试从我的vps连接到RDS时,它说连接被拒绝。 当我尝试从本地或其他VPS连接它,它工作正常。
我发现它一定是我的vps上的防火墙问题。
sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
我运行iptables -L时得到这个输出。
这个命令netstat -ntlp | grep 3306 netstat -ntlp | grep 3306给 –
tcp6 0 0 :::3306 :::* LISTEN
这里出了什么问题?
编辑:正如安德烈所说,我试图telnet。 这是我得到的输出。
Trying <<ip_address>>... telnet: connect to address <<ip_address>>: Connection timed out
EDIT2:其他情况下工作正常的netstat结果。
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 28864/mysqld
我猜测问题是与IPv4和V6? 如何移动该端口来侦听v4?