Davide Gerosa

Local browser on SSH tunnel

This is a short guide to browse the internet using a local browser via a remote server. This is useful to login into a University machine with your RSA key and then browse the internet as if you are on campus.

First, open an ssh connection to your server ([email protected]) specifying the port number (in this case 1337 but you can pick whatever you want):

ssh -D 1337 -f -C -q -N [email protected]

You can check that port is open with

ps aux | grep ssh

On mac then do the following:

  • Go to: “Settings”, “Network”, “Wi-Fi”, “Advanced”, “Proxies”.
  • Click on “SOCKS Proxies” and write “localhost” and “1337” in the two white boxes separated by a colon.
  • Click “Ok” and “Apply”

Here you go, your browser will now believe you’re on campus. Remember you switch the proxy option off when you want to go back to your usual internet setup.