Re: dnsmasq integration? (was: Re: NM trashing resolv.conf when a connection fails)



On Thu, 2011-01-06 at 17:37 -0500, Paul Smith wrote:
> Hm.  I'm looking through lots of NetworkManager pages/docs and the GIT
> repositories, and I see that there has been something titled "Local
> caching nameserver support using dnsmasq" added in 0.8.2.  Unfortunately
> that's just about all the information I've been able to come up with as
> to what this means or does.
> 
> Based on that small sentence and a _very_ quick browse of the code it
> sounds a lot like what I've been playing with, although I was working
> with a small inotify-based solution that would watch /etc/resolv.conf
> and reconfigure dnsmasq appropriately.  Unfortunately as one could
> probably have guessed, applications that modify /etc/resolv.conf are
> simply not well-behaved (including NetworkManager... see my issue in the
> previous post) which makes this pretty difficult.
> 
> 
> Is there any documentation on exactly how this dnsmasq integration in
> NetworkManager works, and/or can anyone who is working with it give me a
> quick overview?

'man NetworkManager.conf' has a short overview of the DNS plugins
available.  You can either use nothing (which works just like before) or
you can use dnsmasq.  There's a BIND plugin that but isn't working yet.

Basically, the LCN support just runs dnsmasq in a LCN configuration, and
when DNS changes, NM rewrites the dnsmasq config file and restarts
dnsmasq for the changes.  The config you'll get is like this:

server=/redhat.com/10.7.142.20
server=/10.in-addr.arpa/10.7.142.20
server=/16.172.in-addr.arpa/10.7.142.20
server=4.2.2.1
server=4.2.2.2

where I've got a VPN connection to Red Hat, and queries for anything Red
Hat related go to internal nameservers, and reverse-DNS queries for
subnets served by the VPN *also* go to internal nameservers.  Anything
else goes upstream.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]