Re: Can't make NM work with local caching DNS resolver



On 06/29/2010 05:46 PM, Robert Nichols wrote:
I am trying to set up dnsmasq as a local resolver cache on my F-12
laptop, and can't find any way to pass the nameservers returned by DHCP
to dnsmasq as upstream nameservers and still have 127.0.0.1 appear as
the primary nameserver in /etc/resolv.conf.

FWIW, I've written a C program that makes this work.  The program sets
up a file alteration monitor on /etc/resolv.conf.  Whenever that file
changes, the code ensures that "127.0.0.1" is the first nameserver
listed there and passes the upstream server addresses to dnsmasq.  A
short script in /etc/NetworkManager/dispatcher.d makes sure this program
is running whenever a network interface is started.  I believe it's
pretty bulletproof, and most of its configuration can be overridden from
the command line.

Source is available from

    http://rnicholsNOSPAM.home.comcast.net/resolvtrac.tar.gz

Comments & suggestions are welcome.

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.


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