ssh proxy

How to Set Up a SOCKS5 Proxy with SSH for Firefox

A SOCKS5 proxy over SSH allows you to securely route traffic through a remote server.
This is useful for bypassing restrictions, hiding your IP, or encrypting web traffic.

1. Configuring the SOCKS5 Proxy in .ssh/config (Recommended for Automation)

To automate the SOCKS5 proxy setup, add this to ~/.ssh/config:


Host my-proxy
    HostName remote-server
    User myuser
    DynamicForward 8888
    ServerAliveInterval 60
    ExitOnForwardFailure no

Then, simply connect by running:

ssh my-proxy

Now, your SOCKS5 proxy is running on localhost:8888.

2. Configuring Firefox to Use the SOCKS5 Proxy

To route Firefox traffic through the SSH SOCKS5 proxy:

  1. Open Firefox and go to Settings > General > Network Settings.
  2. Select Manual proxy configuration.
  3. Set SOCKS Host to 127.0.0.1, Port to 8888.
  4. Select SOCKS v5.
  5. Enable "Proxy DNS when using SOCKS v5" for extra privacy.
  6. Click OK to save.
Summary