This file contains hidden or 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 |