1

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?

vfclists
  • 1,562
  • 5
  • 20
  • 36

1 Answers1

2

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.

Oliver
  • 5,883
  • 23
  • 32