[Dnsmasq-discuss] How to add local configuration to Network Manager initiated dnsmasq in Ubuntu 12.04

Dan Williams dcbw at redhat.com
Tue Oct 9 20:25:54 BST 2012


On Tue, 2012-10-09 at 14:04 +0100, Chris Green wrote:
> On Tue, Oct 09, 2012 at 12:25:41PM +0100, Niall Litchfield wrote:
> >    Chris
> >    Did you come across Stephane Graber's website and article
> >    at [1]http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ (not sure if
> 
> Yes, I've found and read that.  It describes how the new NM driven
> dnsmasq works but give no clue how to customise/configure local DNS.
> 
> 
> >    Stephane is on this list). If what you are after is just nameserver
> >    changes he addresses that. Now I'll admit to disabling the network manager
> >    install of dnsmasq and installing my own installation instead for 2
> >    reasons 
> 
> I don't want nameserver changes, I want a nameserver that works for
> local (LAN) systems.

Back in July we added the ability to drop local dnsmasq config
into /etc/NetworkManager/dnsmasq.d which is part of NM 0.9.6, released
in early August.  I believe this fixes your problem.

The reason we cannot use the normal dnsmasq configuration is that by
default, that gets read, but there's a *lot* of stuff that uses dnsmasq
these days (libvirt, manual installs, NM, etc) and NM's use of dnsmasq
is quite different from these others, and thus the configuration
directives in the default config file simply don't apply to how NM uses
dnsmasq.

I think your best bet is to either:

1) get Ubuntu to backport the patch (git commit
ac152ece0206b4cde28acf78abb21518e67513e1) to 12.04

2) replace dnsmasq with a shellscript that checks the arguments it's
being called with, munges the arguments, and then calls the real dnsmasq

Dan





More information about the Dnsmasq-discuss mailing list