I am trying to connect to a remote mysql server but is encountering this error.On the server I have
Changed Iptables to look like this
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 127.0.0.1 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 107.22.*.* 0.0.0.0/0 tcp dpt:3306
where 107.22.** is the IP of the machine I am trying to connect from
Restarted UFW
What could be the reason for the error?
Change iptables
to look like this instead:
target prot opt source destination
ACCEPT tcp -- 127.0.0.1 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 107.22.*.* 0.0.0.0/0 tcp dpt:3306
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
Otherwise, all 3306 traffic gets dropped by the firewall.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With