So you are using a VPN service or other anonymity services like tor , I2P, proxy servers etc. etc. But still your ISP could track your online activity pretty easily. How ? If your DNS quarries are leaking or VPN connection is not properly configured.
In this tutorial we are going test DNS leak and fix DNS leak problem. Before going further, lets talk about the basic things.
What is a DNS leak ?
When using an anonymity or privacy service, it is extremely important that all traffic originating from your computer is routed through the anonymity network. If any traffic leaks outside of the secure connection to the network, any adversary monitoring your traffic will be able to log your activity.
DNS or the domain name system is used to translate domain names such as www.redsecuretech.com into numerical IP addresses e.g. 22.214.171.124 which are required to route packets of data on the Internet. Whenever your computer needs to contact a server on the Internet, such as when you enter a URL into your browser, your computer contacts a DNS server and requests the IP address. Most Internet service providers assign their customers a DNS server which they control and use for logging and recording your Internet activities.
DNS is the short form of Domain Name System, somewhat like a internet phone book. Which is responsible for resolving a IP address associated with a particular domain name. Like resolving the domain name www.redsecuretech.com will return IP address 126.96.36.199 (may be different).
But If you are using a VPN, every request must be routed through that VPN tunnel including DNS quarries. Why ? to protect yourself from the prying eyes of your ISP, as most ISP deploy their own DNS servers to monitor user activity.
So, what is the problem ? After connecting to the VPN some applications, mostly web browsers still continue the use of your ISP default DNS servers instead of using the VPN’s DNS server. This is the VPN DNS leak problem. At this point, there is no advantage of using a VPN, as your every online activity is going to be logged by your ISP.
How to test DNS leak ?
There is a nifty online dns leak checker named DNSleaktest.com , where you could check for DNS leak very easily. Go to that site and click on the Standard test or Extended test button what ever you like and check the results. If there is any result with a IP address related to your real IP and ISP default DNS servers that means your DNS is leaking.
There is another online tool to check dns leak, dnsleak.com , you may try this one too.
How to Fix DNS leak in Linux ?
To fix DNS leak on your linux operating system follow the below steps:
Open a terminal and make sure you have sudo priviligies.
Type sudo nano /etc/dhcp/dhclient.conf
Add the following code at the end of the file:
supersede domain-name-servers 188.8.131.52, 184.108.40.206;
Press Ctrl+X to save the file
Restart your network interface and check by navigating to dnsleaktest.com
Hope that helps.