Proposal: DNS cache by default for ubuntu-desktop

Kurt Kraut listas at
Wed Jun 2 10:10:04 UTC 2010


My proposal can integrate easily with NetworkManager. It is requires a
single line change in /etc/dhcp3/dhclient.conf:

prepend domain-name-servers;

This will make NetworkManager to always add as the first DNS
server and all DNS servers it will receive by DHCP will be added below in /etc/resolv.conf

So, to implement my proposal, the following simple tasks should be done:

1) Add dnsmasq or nscd as a package to be installed by default in Ubuntu
2) Change a single line in /etc/dhcp3/dhclient.conf as a mentioned.

And voi lá! DNS cache by default. There are several blogs in the internet
teaching how to manually create a DNS cache. I'll point as
an example.

I personally see this so easy to implement that DNS cache could be activade
since Ubuntu 10.10.

Thanks for all your comments,

Kurt Kraut

2010/6/2 Conn O'Griofa <connogriofa at>

> Hi Kurt,
> > I've been using dnsmasq (a lightweight alternative) on my computers to do
> the job and it works great. By default, dnsmasq only replies to
> request, so this wouldn't introduce security weakness.
> >
> > Besides having a DNS cache (like dnsmasq) installed by default, the
> dhclient add as the first name server in /etc/resolv.conf.
> >
> > openSUSE is the only Linux distribution that has a DNS cache out of the
> box. They just provide the nscd package installed by default.
> >
> > This is a pretty easy, simple, powerful feature. I strongly recommend it
> to be implemented."
> >
> > How can I truly submit this proposal? My blueprint has been untouched and
> unread for the last yo years.
> I would like to add my support for this idea. I (and I assume several
> others) have problems with slow DNS lookups on my Ubuntu installations
> when compared to Windows; see bug #94940 [1]. Perhaps a DNS caching
> server such as dnsmasq would alleviate the symptoms of that bug.
> However, if dnsmasq were to be integrated into the default
> installation (and the package was pre-configured as per the dnsmasq
> wiki's instructions [2]), there would be a conflict with
> NetworkManager.
> As you can see from the community instructions, you need to edit your
> /etc/resolv.conf and add the local machine's address ( as
> your first nameserver. This is a problem because any changes to this
> file will be overwritten by NetworkManager each time it initializes a
> new connection (which is warned in the commented section of the file).
> The only solution that I am aware of, is to edit your active network
> connection in NetworkManager's applet, change the setting from
> "Automatic (DHCP)" to "Automatic (DHCP) addresses only", and then
> manually input your DNS servers like so: ", <your regular DNS
> server 1>, <your regular DNS server 1>".
> If we are going to integrate dnsmasq into the default installation it
> may serve us better to investigate the possibility of adding some kind
> of autodetection of the presence of dnsmasq to NetworkManager itself.
> We cannot expect users to manually edit their network connections for
> each new installation (or indeed, each new wireless network profile
> they create).
> Let me also mention that dnsmasq has the capability of providing ICS
> (internet connection sharing) [3]. This would be an excellent feature
> to add to NetworkManager's graphical interface, which is yet another
> feature that competing operating systems provide by default.
> Thanks,
> Conn
> [1]
> [2]
> [3]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Ubuntu-devel-discuss mailing list