Fix A DNS Leak In Openvpn

English

Openvpn DNS leak and how to fix it.

You need to ensure that once connected to the VPN, you are ONLY using the DNS server/s provided by the VPN service and to do this, you need to edit the .ovpn-files as an administrator.

As of OpenVPN version 2.3.9 you can now prevent DNS leaks by adding a new OpenVPN option to your .conf (or .ovpn) files.

Sometimes your web browser will ignore the VPN tunnel and send a request to a DNS server. This occurrence is what is referred to as a VPN DNS leak and once a DNS leak occurs, you will no longer be anonymous and your ISP can surveillance you and track your activities.

This is a more common problem in Windows, but it occurs in Linux as well, but follow this tutorial and you'll be fine.

Openvpn DNS leak and how to fix it.

Openresolv - the DNS management framework:

/etc/resolv.conf

Is a file that holds the configuration for the local resolution of domain names. Normally this file is either static or maintained by a local daemon, normally a DHCP daemon. If you use Privateinternetaccess they will automatically sets your DNS servers to: 209.222.18.222 and 209.222.18.218: and they cannot be changed while the VPN is active.

IMPORTANT! You need to change your DNS settings through Network Manager by doing the following:

  • Go to "System Settings"
  • Click on "Network"
  • Select the "NON-VPN" connection like your Router or Modem.
  • Click "Configure"
  • Click on "Method" and set it to "Automatic (DHCP) addresses only"
  • Enter PIA's DNS servers ( 209.222.18.222 and 209.222.18.218 )
  • Click Save

Then, the next "IMPORTANT" step is to.

Open a terminal window and type:

su

Press Enter and type your admin password.

Press Enter.

cd /

Press Enter.

cd /etc/openvpn

Press Enter.

gedit

Go to /etc/openvpn

Open your .ovpn-files one by one and add these 4 lines:

block-outside-dns
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Save the file.

Activate the VPN and visit: https://whoer.net/

Library categories: 

Games For Linux

Windows has always been the preferred platform for gaming, but after STEAM's interest in Linux more game developers are making their games natively available for Linux.

Disclaimer

All information on this website is published in good faith and for general educational purposes and for use in safe testing environments only. While linuxexperten.com strives to make the information on this site as accurate as possible, linuxexperten.com does not warrant its completeness, reliability and accuracy.

We are not responsible for any losses or damages associated with the use of our website. While we strive to provide only links to useful websites, we have no control over the content of these sites and links to other sites do not constitute a recommendation for all content contained on these websites.

 

Site Information

This is a professional review site that receives compensation from the companies whose products reviewed. Each service or product are thoroughly tested and given high marks if considered to be the very best. Independently owned and the opinions expressed here are no one elses.

 

Limited Time Offers

Coming soon...