Proposal: DNS cache by default for ubuntu-desktop

Andreas Wenning subscriptions at
Wed Jun 2 10:07:11 UTC 2010


On Wednesday 02 June 2010 11:19:06 Bruno Girin wrote:
> On Wed, 2010-06-02 at 09:50 +0100, Conn O'Griofa wrote:
> > Hi Kurt,
> [snip]
> > 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>".
> And this in turn would break configurations where the DHCP server
> provides the name of the DNS server to clients when they connect. Such a
> configuration is extremely common for any network where people are
> transient (public and semi-public networks like libraries, company
> networks where users move from office to office, etc).

When using DNS provided by DHCP the solution is easy.

NetworkManager uses dhclient; so the solution is simply to make the change 
there. In /etc/dhcp3/dhclient.conf the line:
prepend domain-name-servers;
should be present.

This will make all programs use dnsmasq by default; and dnsmasq does by 
default filter out the address and use the servers provided by DHCP.

I haven't tested what happens, if you give NetworkManager static DNS 
addresses; I suppose you would then not use dnsmasq. So we need to find a way 
to make it work in that case.


- - -
 ,-¤.  Kubuntu Linux
¤    ;
 `-¤'  Linux for Human Beings

More information about the Ubuntu-devel-discuss mailing list