Created
May 12, 2016 18:53
-
-
Save thekalinga/ece85f2ecdc325c3d3dc75f9e0b80cee to your computer and use it in GitHub Desktop.
AWS redirect port 80 -> 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
iptables --insert INPUT --protocol tcp --dport 80 --jump ACCEPT | |
iptables --insert INPUT --protocol tcp --dport 8080 --jump ACCEPT | |
iptables --table nat --append PREROUTING --in-interface eth0 --protocol tcp --dport 80 --jump REDIRECT --to-port 8080 | |
# run next line to have changes survive reboot | |
service iptables save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment