newline

Table of Contents

  1. Creating the connection to the jump server
  2. Configuring your client(s)

How to proxy your browser through an SSH connection

Guide, Shell

September 09, 2024

I had a need to access some things on the internet from a different IP address, because of temporary issues with my regular IP. So I thought, what if I could send that data through an SSH connection via my VPS, and access stuff from the IP of my VPS? Turns out that’s totally possible, here’s how you do it.

Let’s call the VPS the “jump server”.

Creating the connection to the jump server

First, you need the jump server to have SSH set up.

Then, on your computer, open a terminal, and set up an SSH tunnel:

ssh -ND 0.0.0.0:22080 jumpserver

Replace jumpserver with the username and IP for your jump server, and add any other flags you normally use to connect via SSH.

The additional flags, explained:

You won’t see any output, it’ll look like the command is hanging. That’s good; it means it’s working.

Configuring your client(s)

Now you need your client apps to use this proxy. I won’t list everything here, only the ones I used; you can find the steps for others with a web search.

For Firefox: go to settings (about:preferences), network settings, “Configure how Firefox connects to the internet”, click the settings button. In the window that opens, click ‘Manual proxy configuration’, next to “SOCKS host” enter localhost and port 22080, click ok. Then, go to some IP checking website to see if it’s working.

For Thunderbird: click the cog for settings, connection, next to “Configure how Thunderbird connects to the Internet” click Settings. In the window that opens, click ‘Manual proxy configuration’, next to “SOCKS host” enter localhost and port 22080, click ok.

You can also proxy your whole system like this; the exact steps depend on the OS and/or distro.