Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to set up OpenVPN on the client so that the gateway is used only on chosen destinations?

I have read this answer OpenVPN make redirect-gateway optional on making the use of the gateway optional, via push-reset.

If any client is configured to route certain destinations through the VPN, by using say FoxyProxy or changing the routing tables will the forwarding work as normal?

share|improve this question

1 Answer

up vote 2 down vote accepted

You can configure the server to push only certain routes to its clients. For example, in order to force only traffic to 10.10.10.10 through the VPN, add the following to your server's configuration:

push "route 10.10.10.10 255.255.255.255"

Of course, for this to work, the redirection of the default gateway needs to be switched off. To do this, remove any push "redirect-gateway ..." directive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.