From charlesreid1

Tunneling HTTP over SSH

Tunneling http traffic (i.e., what your browser uses) over SSH is really easy, because it uses the SOCKS http proxy protocol (https://en.wikipedia.org/wiki/SOCKS), which in turn is built into ssh.

So it's as easy as doing this:

ssh -D 8080 username@servername

and this opens a local SOCKS port (8080) which you can then point your browser to.

Chrome

I use TunnelSwitch for Chrome, and create a tunnel with the following information:

  • host = localhost
  • port = 8080

Chrome then uses the SOCKS proxy through port 8080, which redirects traffic through the SSH tunnel. This should tunnel all protocols through the SSH tunnel.

Firefox

Changing this regularly is cumbersome. There is probably a plugin that will make this easier, but since I don't use Firefox, I haven't looked for one.

Open your Firefox settings. Click Advanced. Click the Network tab. Click the "Settings..." button. Click "Manual proxy configuration".

Like before, we're going to use the SSH tunnel for all protocols, so keep the "Use this proxy server for all protocols" box checked. Specify localhost (or 127.0.0.1), port 8080.