Skip to content

Instantly share code, notes, and snippets.

@kharandziuk
Last active October 1, 2020 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kharandziuk/d25fc04cc8e8fd33946fffb157c3f440 to your computer and use it in GitHub Desktop.
Save kharandziuk/d25fc04cc8e8fd33946fffb157c3f440 to your computer and use it in GitHub Desktop.
Port forwarding
iptables -A INPUT -p tcp --dport 11101 -j ACCEPT
iptables -A PREROUTING -t nat -p tcp --dport 11101 -j REDIRECT --to-port 11100
iptables -t nat -I OUTPUT -p tcp -o lo --dport 11101 -j REDIRECT --to-ports 11100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment