Created
February 25, 2012 19:07
-
-
Save yanaga/1910125 to your computer and use it in GitHub Desktop.
iptables redirection from port 80 to port 8080
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 | |
sudo iptables -t nat -A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 | |
sudo iptables-save | sudo tee /etc/iptables.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment