When I am trying to connect to RDS from my vps, it says connection refused. When I tried connecting it from local or other vps, it worked fine.
I figured out that it must be a firewall issue on my 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
I get this output when I run iptables -L
.
this command - netstat -ntlp | grep 3306
gives -
tcp6 0 0 :::3306 :::* LISTEN
What is it that went wrong here?
EDIT: As mentioned by Andrey, I tried to telnet. This is the output that I get.
Trying <<ip_address>>...
telnet: connect to address <<ip_address>>: Connection timed out
EDIT2: Result of netstat
on other instance where things are working fine.
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 28864/mysqld
I am guessing the problem is with IPv4 and v6? How can I move that port to listen to v4?