Created
November 29, 2018 17:21
-
-
Save luke10x/2c6827fa60900381e69310dcb9c97014 to your computer and use it in GitHub Desktop.
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
### Flush and Delete Old Settings ... | |
iptables -X | |
iptables -F | |
iptables -t nat -F | |
### " ALL MYSQL TRAFFIC FROM Y, PORT (3306) TO Z PORT (3306) ...." | |
# iptables -t nat -A PREROUTING -p tcp -d db-host.com --dport 3306 -j DNAT --to-destination 192.168.5.1:4041 | |
iptables -t nat -A OUTPUT -p tcp -d db-host.com --dport 3306 -j DNAT --to-destination 192.168.5.1:4041 | |
#iptables -A FORWARD -p tcp -d db-host.com --dport 3306 -j ACCEPT | |
### "FORWARD PACKETS ON EH0 AND EH1 ...." | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
### "MASQUERADE ON EH0 FOR NAT ...." | |
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