Skip to content

Instantly share code, notes, and snippets.

@ahk
Created May 14, 2011 11:40
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 ahk/972137 to your computer and use it in GitHub Desktop.
Save ahk/972137 to your computer and use it in GitHub Desktop.
redirect traffic on port 80 to port 8080 with iptables
# redirect traffic on port 80 to port 8080 with iptables
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment