I'm in IP tables hell, for the first time in ten years!
# Generated by iptables-save v1.6.0 on Fri Jan 10 16:36:24 2020
*nat :PREROUTING ACCEPT [0:0] :INPUT ACCEPT [0:0] :OUTPUT ACCEPT [6:371] :POSTROUTING ACCEPT [6:371]
-A PREROUTING -p tcp -m tcp --dport 3306 -j DNAT --to-destination 172.25.25.50:3306
-A PREROUTING -p tcp -m tcp --dport 3307 -j DNAT --to-destination 172.25.25.226:3306
-A POSTROUTING -d 172.25.25.50/32 -p tcp -m tcp --dport 3306 -j SNAT --to-source 10.128.128.52
-A POSTROUTING -d 172.25.25.226/32 -p tcp -m tcp --dport 3306 -j SNAT --to-source 10.128.128.52 COMMIT
# Completed on Fri Jan 10 16:36:24 2020
Basically I have 2 independent mysql server instances on the end of the line.
Server 1 - 172.25.25.50:3306 can be reached successfully.
Server 2 - 172.25.25.226:3307 cannot be hit at all.
The source is the same for both, it's an LB - 10.128.128.52, which is why Server 1 and Server 2 are using different ports. port 3306/3307 are open on the LB and the machine, I think.
Forwarding is turned on, both on the server OS and the instance settings..
root@art-proxy1-us:/home/ben# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:mysql to:172.25.25.50:3306
DNAT tcp -- anywhere anywhere tcp dpt:3307 to:172.25.25.226:3306
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT tcp -- anywhere 172.25.25.50 tcp dpt:mysql to:10.128.128.52
SNAT tcp -- anywhere 172.25.25.226 tcp dpt:mysql to:10.128.128.52
HALP! :D