Last active
April 25, 2022 23:11
-
-
Save siculars/6789335 to your computer and use it in GitHub Desktop.
Set an ip on local loopback then ssh tunnel to it. If you are blocked from accessing any specific ip, you can set it up locally and ssh tunnel to it.
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
#unix (replace 1.2.3.4 with website/service ip address) | |
#add | |
#ip addr add 1.2.3.4/32 dev lo | |
#delete | |
#ip addr del 1.2.3.4/32 dev lo | |
#mac | |
#add | |
#sudo ifconfig lo0 add 1.2.3.4 | |
#delete | |
#sudo ifconfig lo0 delete 1.2.3.4 | |
#you can also forward multiple ports in one command, ie. 5000 and 5001 | |
#(replace 1.2.3.4 with website/service ip address) | |
# -L format: | |
# [local address]:[local port]:[remote address]:[remote port] | |
#ssh -L 1.2.3.4:5000:1.2.3.4:5000 -L 1.2.3.4:5001:1.2.3.4:5001 user@host.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment