Skip to content

Instantly share code, notes, and snippets.

@rahulpandey
Created September 21, 2017 07:44
Show Gist options
  • Save rahulpandey/94c52b9b1441ccf2ff8253e2bf7675a6 to your computer and use it in GitHub Desktop.
Save rahulpandey/94c52b9b1441ccf2ff8253e2bf7675a6 to your computer and use it in GitHub Desktop.
Aws instance ec2
#!/bin/bash
apt-get update
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment