Hi there,
I have a server with MySQL on it. I want to close the original port (3306) to the world, but set another port (high number) to receive connections to MySQL, because my MySQL port is frequently scanned by "hackers", brute-force user/pass. I cannot change the TCP port on my.cfg for several reasons.
I already closed port 3306 but I cannot set the other port
What I did to redirect:
iptables -t nat -A PREROUTING -i bond1 -p tcp -m tcp --dport 63306 -j DNAT --to-destination 127.0.0.1:3306
I tryed to close public (valid IP) port and open a public port 63306 poiting to localhost (that is still acessible). I tryed other ways (using Redirect and Forward) with no success...
Well, I have good knowledge on Linux but not on IPTables.
Can you help me? Thank you.