How to fix DNSleak in Ubuntu 17

In Ubuntu 17, DNS is managed through systemd-resolved, which is very bad for VPN connections. To fix a DNS leak, you must delete resolved, and instead install the good old DNSMSQ and give control to the NetworkManager.

To do this, execute the following commands in the terminal:

sudo su

apt update

apt install dnsmasq

systemctl disable systemd-resolved.service

systemctl stop systemd-resolved.service

rm /etc/rc.local

Edit the file:

nano /etc/rc.local

Add a line to the file

nameserver 127.0.0.1

Edit the file:

nano /etc/NetworkManager/NetworkManager.conf

Add a line to the file

dns=dnsmasq

Reboot the System

reboot

Categories News, Без рубрики