Skip to content

Instantly share code, notes, and snippets.

@eculver
Created April 18, 2011 16:18
Show Gist options
  • Save eculver/925636 to your computer and use it in GitHub Desktop.
Save eculver/925636 to your computer and use it in GitHub Desktop.
Reverse SSH tunnelling
Via: http://www.rustyrazorblade.com/2010/03/ssh-reverse-tunnel-to-access-box-behind-firewall/
On host behind NAT/firewall:
ssh -R 5000:localhost:22 eculver@imatool.no-ip.org
On host (imatool.no-ip.org) connecting from outside:
ssh localhost -p 5000
Then to proxy all traffic through that host, open a SOCKS proxy:
ssh -D 9999 username@localhost -p 5000
And finally set up your local machine's browser to use that proxy on port 9999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment