Skip to content

Instantly share code, notes, and snippets.

@dannyge
Created July 21, 2016 08:51
Show Gist options
  • Save dannyge/a7199e88c9c468811879791c09b9e7e2 to your computer and use it in GitHub Desktop.
Save dannyge/a7199e88c9c468811879791c09b9e7e2 to your computer and use it in GitHub Desktop.
centos
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp --dport 3366 -j DNAT --to-destination 10.91.13.195:3306
iptables -t nat -A POSTROUTING -d 10.91.13.195 -p tcp --dport 3306 -j SNAT --to 10.253.5.175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment