Skip to content

Instantly share code, notes, and snippets.

@trastle
Created July 15, 2013 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trastle/6000750 to your computer and use it in GitHub Desktop.
Save trastle/6000750 to your computer and use it in GitHub Desktop.
iptables NAT rule to send traffic on port 80 to a service running on 8080
## begin nat
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -i eth2 -p tcp --dport 80 -j DNAT --to-destination :8080
COMMIT
### end nat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment