Installation and configuring DNS

Using a DNS server installing on a device which has VPN connection (localhost, 127.0.0.1) makes identity of the internal IP (outgoing server) and DNS from the point of view of an external network. One of the most popular caching DNS servers is Unbound.

Installing and starting Unbound

The default config makes Unbound available for localhost. It means that it is enough install and run Unbound only.

RH-based Linux

# yum install unbound
# service unbound start

Debian-based Linux

$ sudo apt-get update
$ sudo apt-get install unbound
$ sudo service unbound restart

Windows

Windows version is available on the official page. Installation manual: http://unbound.net/documentation/unbound-windows-manual-01.pdf.

DNS settings

Linux

Usually Linux DNS settings saves in /etc/resolv.conf. NetworkManager configures DNS after success connection automatically. It is necessary to edit /etc/resolv.conf manually to use Unbound.
# echo "nameserver 127.0.0.1" > /etc/resolv.conf

Windows

In Windows it is necessary to set 127.0.0.1 as DNS server in the settings of the internet connection.