Created
August 23, 2017 18:50
-
-
Save sloppycoder/6cba6edc4e95d4cb2bb39a7efe8caf95 to your computer and use it in GitHub Desktop.
redirect port on linux
This file contains hidden or 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
| # redirect port < 1024 to other ports so that server process can run as non-root | |
| # localhost/loopback | |
| sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 443 -j REDIRECT --to-ports 8443 | |
| # external | |
| sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment