-
-
Save yihyang/0eb5fda3ad86303358cdf8c41bb07022 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