Skip to content

Instantly share code, notes, and snippets.

@zouzias
Created December 3, 2014 11:14
Show Gist options
  • Save zouzias/ab5d3b0881645e7e8ec7 to your computer and use it in GitHub Desktop.
Save zouzias/ab5d3b0881645e7e8ec7 to your computer and use it in GitHub Desktop.
Redirect ports using IPTABLES
# Re-directs port 80 to 5601
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 5601
# Apply
sudo service iptables restart
# Ubuntu
sudo iptables-save && sudo iptables-apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment