Replace DNS on Openvpn client without redirect-gateway

Posted by Gabor Vincze on Server Fault See other posts from Server Fault or by Gabor Vincze
Published on 2012-10-26T17:12:19Z Indexed on 2012/11/07 17:03 UTC
Read the original article Hit count: 235

Filed under:
|
|
|
|

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

© Server Fault or respective owner

Related posts about dns

Related posts about windows-7