linux_wiki:ssh_proxy_tunnel

SSH Proxy Tunnel

General Information

You are somewhere that has a restrictive firewall/web proxy, but allows SSH. This trick allows you to tunnel your web browser's traffic through SSH to a remote system and browse the web as if you were at that remote system.

Checklist

  • Distro(s): Any
  • Other: You already have a remote SSH server set-up that is accessible from the internet. (At home, hosted, etc)

1) Open a SSH tunnel to the remote system and specify a dynamic application listening port (Example: -D 1337):

ssh -D 1337 user@yourhome.com

2) Edit your browser proxy settings to use the same port SSH is listening on.

Firefox Quantom

  • Open Menu (three horizontal lines) → Preferences → General → Network Proxy → Settings…
    • Check “Manual proxy configuration”
    • SOCKS host: localhost
    • Port: 1337
      • Select “SOCKS v4”
    • Remove “localhost” from the “No Proxy for” text box
    • Click OK
  • You may also have to set the “network.proxy.socks_remote_dns” value to true (http://about:config)
  • linux_wiki/ssh_proxy_tunnel.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)