Ternux
Port Forwarding

SOCKS5 Proxy

Route application traffic through an SSH server using a dynamic SOCKS5 proxy.

A SOCKS5 tunnel creates a dynamic proxy on your local machine. Instead of forwarding a single port, any application configured to use the SOCKS5 proxy can route all its traffic through the SSH server.

Common use cases

  • Browse the web as if you are on the remote server's network
  • Route CLI tools (curl, git) through a specific network region
  • Access internal services without setting up individual local forwards

Adding a SOCKS5 tunnel

  1. Go to Connections → Port Forwarding.
  2. Click New TunnelSOCKS5.
  3. Fill in:
FieldExampleDescription
Connectionprod-serverThe SSH host to use as the proxy exit
Local port1080Local port to listen on (SOCKS5)
LabelProd proxyFriendly name
  1. Save, then toggle the tunnel Active.

Configuring applications

Point your application's SOCKS5 proxy setting to 127.0.0.1:<local port>.

curl example:

curl --socks5 127.0.0.1:1080 https://example.com

Browser (Firefox): Settings → Network Settings → Manual proxy → SOCKS Host: 127.0.0.1, Port: 1080, SOCKS v5.

Stopping the proxy

Toggle the Active switch off. The local SOCKS5 listener is closed immediately.

On this page