Automatically switch DNS servers based on IP?

Megalith

24-bit/48kHz
Staff member
Joined
Aug 20, 2006
Messages
13,000
I've got a DNS leak on my VPN unless I specify specific DNS servers under my network card's configuration. However, those servers can only be used when the VPN is active, so I have to change my settings every time I go back to my regular IP.

Is there a way to make this more practical, like an app that switches DNS servers automatically based on IP?
 
You'll need to tell us what kind of VPN you're using and what program or setup you're using to connect to it.

For example; my OpenVPN configurations specify a DNS server, which are only used when the VPN is connected to alleviate this problem - however ALL DNS traffic flows over the VPN when it's connected.
 
I would suggest trying to figure out why you are having a DNS leak first.

A simply VB or PowerShell script can be written to run every minute, check your IP, and update your DNS servers accordingly.
 
I use AirVPN but found out it's just a shell of sorts for OpenVPN. Does the software at http://openvpn.net/ come with a GUI that will allow me to specify DNS?
 
If it creates a "normal" Windows VPN interface, you can modify it with a PowerShell script pretty easily.
 
Back
Top