DEV Community

De
De

Posted on

4 2

SSH - A Better VPN 🚀

As alternative to VPN, a SOCKS5 tunnel is often a faster, cheaper alternative.

$ ssh USERNAME@IP -D PORT

In the following example, the USERNAME we use is root, the VPS IP is 23.84.52.11 and we want to create a SOCKS5 listening on PORT 2240:

$ ssh root@23.84.52.11 -D 2240

The SOCKS5 proxy should now be available.
Adjust your browser settings accordingly; the proxy host will be 127.0.0.1 or localhost and the port 2240:

127.0.0.1:2240
or
localhost:2240

Finally, if you want to surf without a proxy, Tun2socks is a great tool you can use to tune a SOCKS proxy to a virtual interface.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay