Created
September 25, 2020 06:52
-
-
Save porn/7896858125d31f857639e24b9940f282 to your computer and use it in GitHub Desktop.
redirect local 443 requests to another port
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
# after this commnad you can query https://localhost which will actually serve https://localhost:4200 | |
sudo iptables -t nat -A OUTPUT -s localhost -p tcp --dport 443 -j REDIRECT --to 4200 | |
# to view the rules | |
sudo iptables -L -t nat | |
# to remove the rule: | |
sudo iptables -t nat -D OUTPUT -s localhost -p tcp --dport 443 -j REDIRECT --to 4200 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment