DEV Community

De
De

Posted on

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.

Latest comments (0)