1

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

0

1 Answer 1

0

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
1
  • but,3306 must be open,I want 3306 deny access from public network!
    – ikool
    Jul 2, 2014 at 2:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .