A Very Easy SSH Proxy/Tunnel

  • September 2, 2007
  • Avatar for jacob
    Jacob
    Peddicord

Whether your ISP is filtering content or you just want some privacy on the internet, there is always a quick solution, and it is surprisingly easy to set up.

Basically, all you need to do is SSH to any Shell account that you have access to (it can even be your own PC from another location) with the option -D. For example:

ssh -D 7070 [email protected]

will connect to site.com as user, and create a proxy server at port 7070 (this does not need to be set up on the shell).

Then all you have to do is configure your browser/IM/torrent clients to use "localhost" as a SOCKS v5 server. For Firefox, this is in Edit > Preferences (or Tools > Options on Windows). Click the Advanced tab, and then the Network tab under it. Then open Settings, and select Manual Proxy Configuration. Type localhost ONLY in the SOCKS Host box, and type the same port number you used above.

That's it! To turn the proxy off, close your SSH session and change your browser settings back.

Just yet another use for SSH.

Note: Reader Don McArthur has tipped us off that you might need to make some changes to your SSH server before this will work. If it doesn't, add these lines to /etc/ssh/sshd_config:

AllowTcpForwarding yes
GatewayPorts yes
TCPKeepAlive yes

Calling all FOSSwire readers! We’re looking for your feedback - answer our reader survey and you could win an awesome FOSSwire t-shirt (we’ll ship anywhere on this planet).

Avatar for jacob Jacob Peddicord

Home » Articles »