Replace DNS on Openvpn client without redirect-gateway
- by Gabor Vincze
I am trying to push DNS to the client with OpenVPN server with config:
push "dhcp-option DNS 192.168.x.x"
It is working well, but what I really need is that during the VPN connection I do not want to use my primary resolvers, clients should use only the DNS provided by the server.
It can be done with push redirect-gateway, but I do not want to tunnel all connections from the client thru the VPN, only specific networks.
Is it possible to do it somehow?
Linux clients are OK with a script, on Windows I am not sure