I have a software that I want to run through the VPN, but the remaining software on the machine shouldn't run through the VPN (the VPN is slower than my home connection).

I'm playing with ipfw, route and openvpn to achieve this and my thought is that it would be easier to route all the requests of one user through the VPN, while the rest ignores it.

Unfortunately, there doesn't seem to be a way to specify that a certain route should be applied only to one user.

How can I achieve the following result?

su foo -c 'curl ifconfig.co' # Outputs VPN IP address
su root -c 'curl ifconfig.co' # Outputs home IP address
  • You're looking for a proxy I'd say, not a VPN. – Ginnungagap Oct 14 '20 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.