Skip to content

Instantly share code, notes, and snippets.

View nileshkant's full-sized avatar
🏠
Working from home

Nilesh Kant nileshkant

🏠
Working from home
View GitHub Profile
@nileshkant
nileshkant / change-ip-tables.sh
Created November 9, 2019 18:15 — forked from thekalinga/change-ip-tables.sh
AWS redirect port 80 -> 8080
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