Skip to content

Instantly share code, notes, and snippets.

@ly0
Last active June 23, 2018 04:49
Show Gist options
  • Save ly0/9485a5432d8be13c6a36421487999d8c to your computer and use it in GitHub Desktop.
Save ly0/9485a5432d8be13c6a36421487999d8c to your computer and use it in GitHub Desktop.
sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -A PREROUTING -t nat -p tcp --dport 443 -j REDIRECT --to-port 8443
sudo sh -c "iptables-save > /etc/iptables.rules"
sudo apt-get install iptables-persistent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment