Different IP with ssh tunnel and proxy SOCKS

Sometimes you have to access website or FTP server with some different IP than you are getting from your internet provider. One way to accomplish that is to use ssh tunnel with proxy SOCKS.

Here is the instruction how to open SSH tunnel on local port 8181 using ssh account user@xxx.xxx.xxx.xxx and configure Firefox to use it with proxy SOCKS.

  1. Open console.
  2. Run command below.
    ssh -D 8181 -f -C -q -N -p 22 user@xxx.xxx.xxx.xxx
    If you have no errors form previous command then we have the tunnel working.
  3. Now we need to configure Firefox to use it:
    • Open Firefox browser.
    • In address bar enter “about:preferences#advanced”.
    • Choose “Connection -> Settings”.
    • Find SOCKS host and enter there “127.0.0.1” ad port “8181” (see image below).
    • In Firefox open website https://www.whatismyip.com/ and check your IP.
      It should be xxx.xxx.xxx.xxx.
      Firefox SOCKS configuration.

Similiar you can configure FlileZilla ftp client to also use tunnel to connect to target FTP.
This instruction is for linux based systems. For Windows you need to create tunnel with Putty.