-
-
Save goors/8feca4633da1878a7f108b32f5b513ba to your computer and use it in GitHub Desktop.
Forward MySQL port to another IP with IPTABLES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to 10.0.4.172:3306 | |
iptables -A FORWARD -p tcp -d 10.0.4.172 --dport 3306 -j ACCEPT | |
iptables -t nat -A POSTROUTING -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment