Openvpn forward all routing to a socks port

openvpnsockstunnel

Is it possible to configure openVPN to route all client connections through a socks port? ie, I want the setup to be:

Client -> openvpn server -> localhost socks5 port -> socks5 port forward -> the internet
machine 1    machine 2           machine 2              machine 3

How would I go about doing that?

So far I've been doing the same thing but with an SSH tunnel instead of vpn and while it's been working fine, I'm going to be adding new devices which don't do ssh tunneling as well as vpn.

Best Answer

I don't think you can.

SOCKS isn't a networking (layer 3) protocol, it's a layer-4 protocol, up with the rest of the applications. Leaving OpenVPN (which does operate at layer 3) out of the picture, clients normally have to be SOCKS-aware if they want to route their traffic via a SOCKS proxy. Each piece of client software has to know where the SOCKS proxy is, each has to know how to open a SOCKS connection via that proxy, and so on.

When you add OpenVPN into the picture, it doesn't suddenly make the end-client applications brighter. Nor does a remote OpenVPN server have the ability to magically enagage in SOCKSification for any client traffic that passes along it.

OpenVPN is SOCKS-aware to the extent that it can build its tunnels to remote end-nodes via a local SOCKS proxy, but I believe that's as far as it goes.

Related Topic