mysql real port is 3306。
I want public network using 53306 to visit mysql,and 3306 not allowed access from public network.
How to write the iptables rules DNAT 53306 to 127.0.0.1 3306 ? help me
You can redirect the Traffic from Port 53306 to 3306 with
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 53306 -j REDIRECT --to-port 3306