Skip to content

Instantly share code, notes, and snippets.

@bchapuis
Last active December 17, 2015 07:59
Show Gist options
  • Save bchapuis/5576773 to your computer and use it in GitHub Desktop.
Save bchapuis/5576773 to your computer and use it in GitHub Desktop.
Iptables port forwarding
iptables -t nat -F
iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j
REDIRECT --to-ports 9000
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT
--to-port 9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment