Last active
October 1, 2020 15:55
-
-
Save kharandziuk/d25fc04cc8e8fd33946fffb157c3f440 to your computer and use it in GitHub Desktop.
Port forwarding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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