Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Created September 8, 2015 14:04
Show Gist options
  • Save amacgregor/64b35ee425c90447888e to your computer and use it in GitHub Desktop.
Save amacgregor/64b35ee425c90447888e to your computer and use it in GitHub Desktop.
iptables -t nat -A PREROUTING -p tcp -d 192.168.99.100 --destination-port 3306 -j DNAT --to-destination 192.168.99.1:3306
iptables -t nat -A POSTROUTING -p tcp -d 192.168.99.1 --destination-port 3306 -j SNAT --to-source 192.168.99.100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment