Created
July 26, 2015 21:20
-
-
Save fwip/0c1915144ce71c162cec to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
username="MYUSERNAME" | |
origPort="80" | |
midlPort="38080" | |
destPort="80" | |
midlHost="MYMIDDLEMAN" | |
destHost="MYDESTINATION" | |
# Sudo is just needed for privileged ports; if forwarding non-80 do not use. | |
sudo \ | |
ssh "-L$origPort:localhost:$midlPort" "$username@$midlHost" -t \ | |
ssh "-L$midlPort:localhost:$destPort" "$username@$destHost" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment