2

I am using Ubuntu 12.04.2 LTS.

If I issue the following command

sudo gedit /etc/NetworkManager/NetworkManager.conf

and change the line

dns=dnsmasq

to

#dns=dnsmasq

What will happen? Will I disable or enable DNS caching?

Additional notes:

I have been told that since I am using a VPN service, it would be better for me to do the above.

Eric Carvalho
  • 55,453
n00b
  • 1,927

2 Answers2

0

Extract from http://www.ubuntugeek.com/how-to-disable-dnsmasq-in-ubuntu-12-04precise.html

The big advantage is that if you connect to a VPN, instead of having all your DNS traffic be routed through the VPN like in the past, you’ll instead only send DNS queries related to the subnet and domains announced by that VPN. This is especially interesting for high latency VPN links where everything would be slowed down in the past.

As for dealing with DNS failures, dnsmasq often sends the DNS queries to more than one DNS servers (if you received multiple when establishing your connection) and will detect bogus/dead ones and simply ignore them until they start returning sensible information again. This is to compare against the libc’s way of doing DNS resolving where the state of the DNS servers can’t be saved (as it’s just a library) and so every single application has to go through the same, trying the first DNS, waiting for it to timeout, using the next one.

So it will not disable it as such, it will be less "safe" and efficient under certain circumstances. Like VPN

Meer Borg
  • 5,003
0
  1. dnsmasq launched by NetworkManager doesn't cache query results by default. You can confirm this by running:

    ps aux | grep dnsmasq
    

    You should see --cache-size=0 as an argument to dnsmasq, which disables caching.

  2. If you want to make sure DNS as well as any traffic is being routed through VPN (I believe you do based in your other question), you can use iptables to accept output traffic destined to VPN gateway and block any other destination. Thus there's no need to touch Networkmanager configuration.

Eric Carvalho
  • 55,453