Skip to content

Instantly share code, notes, and snippets.

@tiernano
Created May 31, 2016 07:53
Show Gist options
  • Save tiernano/68894593dd44acb4820617aef2889fd6 to your computer and use it in GitHub Desktop.
Save tiernano/68894593dd44acb4820617aef2889fd6 to your computer and use it in GitHub Desktop.
iptables -t nat -A POSTROUTING -o eth0 -s <internalIP> -j SNAT --to-source <externalip>
iptables -t nat -A PREROUTING -i eth0 -d <externalip> -j DNAT --to-destination <internalip?
iptables -A FORWARD -s <externalip> -j ACCEPT
iptables -A FORWARD -d <internalip> -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment