16
7
How can I set DNS servers on the client using only the client configuration. My client is a windows machine and I want to change the DNS servers when the client connects and revert back to the original configuration when I disconnect from the VPN.
All information I have found so far refers to pushing the DNS configuration to the client using the server's config but in this case I can't change the server configuration and am currently doing it manually every time I connect to the VPN. An openvpn config option to set the local machines DNS servers for the duration of the connection would be great.
4This didn't work for me though it seems like it should. The option wasn't in the generated client.ovpn. When I add it, it still doesn't work. Running from an Asus RT-N66U with stock firmware 3.0.0.4.376_3861 – Shea – 2016-07-19T15:32:23.033
2I added this to my .ovpn file just before the <ca> tag and it worked splendnidly! Thank you! I tested this on my windows machine with OpenVPN 2.4.4 Windows version 6.2 – Michael Kargl – 2018-03-10T12:58:06.613