Skip to content

Instantly share code, notes, and snippets.

@srhopkins
Last active October 14, 2016 22:14
Show Gist options
  • Select an option

  • Save srhopkins/b3a18406b74a11dab87d to your computer and use it in GitHub Desktop.

Select an option

Save srhopkins/b3a18406b74a11dab87d to your computer and use it in GitHub Desktop.
Tunnel/proxy through gateway/jumphost using ssh
# /etc/hosts would have something like this
# 127.0.0.2 a.firewalled-app.tld
# On Mac you need to `sudo ifconfig lo0 alias 127.0.0.3 up`
# Then run a command/script like this.
ssh -L 127.0.0.2:80:a.firewalled-app.tld:80 \
-L 127.0.0.2:443:a.firewalled-app.tld:443 \
[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment