Can I install dnsmasq as well as (instead of?) dnsmasq-base?

Marius Gedminas marius at pov.lt
Mon Nov 12 12:36:11 UTC 2012


On Mon, Nov 12, 2012 at 12:20:32PM +0000, Chris Green wrote:
> Current (i.e. 12.04 and 12.10) versions of Ubuntu install dnsmasq-base
> as a dependency of Network Manager (this is because Network Manager now
> runs dnsmasq as a local caching DNS server).
> 
> I want to run my own configuration for dnsmasq.  If I install the
> dnsmasq package will this then 'play nicely' with Network Manager?

TL;DR: Yes.


For values of 'play nicely' meaning your dnsmasq configuration will
override whatever Network Manager is doing, so, e.g., if you configure
split DNS configuration for your VPNs in NM, that configuration will not
have any effect.  (I'm assuming you can do that in NM, I've never tried
myself.)

On the other hand, things work fine for regular use -- when Network
Manager connects to some network and gets a DHCP lease, the proper DNS
for that network ends up being used by the system-wide dnsmasq.

I ran that configuration for a while on 12.04.  One thing that made
things work better in this particular case was adding

  clear-on-reload

to /etc/dnsmasq.d/clear-cache-on-network-switch (because the local DNS
server at my office network resolved some fully-qualified hostnames to
their internal IPs, and that would break connectivity to them when I
moved outside of that LAN).


Another caveat to note: if you apt-get install dnsmasq, decide it
doesn't work right, then apt-get remove dnsmasq, it will leave
/etc/init.d/dnsmasq in place (it's a conffile!), which means you will
still have a running system-wide dnsmasq that will prevent the one
started by Network Manager to binding to a socket.  So if you find
something doesn't work, be sure to apt-get purge dnsmasq to get to the
status quo ante.

Marius Gedminas
-- 
PCMCIA - People Can't Memorize Computer Industry Acronyms
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121112/10e97ea4/attachment.pgp>


More information about the ubuntu-users mailing list