[Dnsmasq-discuss] dnsmasq on Ubuntu 14.04 and Network Manager

Dan Williams dcbw at redhat.com
Tue Sep 29 18:50:13 BST 2015


On Tue, 2015-09-29 at 09:04 -0500, Brian Watson wrote:
> Hi,
>    I had this working on Ubuntu 10.04, but now I would like to get it
> working on 14.04 with a better understanding of what's happening. On 10.04
> I installed dnsmasq without understanding that there was probably one
> already installed as part of NetworkManager. With 14.04 I would like to
> just use the version that's used by NetworkManager, but I didn't understand
> the following:

NM doesn't use a private on-disk copy of dnsmasq or anything, it uses
the normal system copy that's already installed.  But it spawns a
private *runtime* dnsmasq process to handle either (a) the local caching
nameserver functionality, or (b) the internet connection sharing
functionality.

So it depends on what you want to use dnsmasq for; which one are you
trying to do?  If it's internet connection sharing, then with the NM
0.9.8 in Ubuntu 14.04 you cannot change the address range handed to
clients on the interface.  That has been fixed in NM 0.9.10 and later
but even though that version is more than a year old, it is only
included in Ubuntu 15.04.

Typically you never really need to touch the dnsmasq that NM spawns,
because modifications are usually done through the NM configuration not
dnsmasq.  An independently installed and configured dnsmasq usually does
not conflict with NetworkManager's copy, unless:

1) you have configured the independent copy to bind to the same
interface/IP address that NetworkManager's copy is bound to, or you have
allowed the independent copy to bind to all interfaces ("*") which
obviously conflicts with the one NM spawns for interfaces it manages

2) you have enabled NM's local caching nameserver functionality and you
have configured the independent copy to do the same thing

In Ubuntu, NM and dnsmasq communicate via D-Bus, not through
configuration files.  For internet connection sharing, NM spawns and
kills its own copy for that specific interface.  For local caching DNS,
I think the dnsmasq may be started by 

Dan

> 1. The first thing I needed to do was to find the existing dnsmasq.conf so
> that I could add my changes there and there is a version in
> /etc/dbus-1/system.d/dnsmasq.conf
>  2. dnsmasq.conf - it has XML type data in it related to busconfig with
> some policies depending on the user.
>  3. Can this file be modified so that I can add an interface with an
> address range of IP addresses that I would like to use?
>  4. If I install an independent version of dnsmasq does that interfere with
> the NetworkManager one?
>  5. Where is the NetworkManager one being started from? I looked in
> /etc/init.d, but I didn't see anything for dnsmasq. I grepped the running
> processes and it shows up as running.
> 
> Best Regards,
>    BW
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss





More information about the Dnsmasq-discuss mailing list