Hehe, that is very similar to what I've been doing. See the link below, I wrote the post about the script, run from cron, that edits the resolv.conf file with ed. I didn't bother with file monitoring because I wrote it quick and dirty.
http://www.thejackol.com/2008/05/20/fixing-networkmanager-dns-issue-in-ubuntu-hardy-herongutsy/ I'm really looking for NetworkManager to provide the ultimate solution so that I can stop having to put so much thought in to this each time I've got a new machine to set up. Even if NetworkManager just provided a boolean option to support a local caching nameserver. This could be presented in the GUI as "This system has a caching name server" with a check box. Default is off. I would like a way to configure this from the command line but I'm sure I could figure that out by learning a little more about dbus. You know what! I just found in the NetworkManager release notes (wiki, ReleaseProcess) that "Local caching nameserver support" is tentatively planned for the 0.8.2 release. I missed this before. This is great! You have my vote for this feature! Thanks, Carl On Thu, Jul 29, 2010 at 9:00 AM, Robert Nichols <[email protected]> wrote: > On 07/29/2010 09:33 AM, Carl Baldwin wrote: >> I have fought with this issue since Ubuntu started using >> NetworkManager and my dhclient.conf settings stopped working. >> >> I use dnsmasq on my machine for several reasons. I like having a >> caching nameserver but more importantly I use dnsmasq so that I can >> set up rules for which upstream servers to contact for certain >> domains/networks. I do this because I routinely create VPN tunnels to >> other networks and there are situations where I set static routes to >> other networks through non-default gateways. The bottom line is that >> I do a few complex things in my network setup so that other things end >> up being a lot easier. > > Fearless enough to run a helper program? I've written a C program that > makes dnsmasq 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 > > -- > Bob Nichols "NOSPAM" is really part of my email address. > Do NOT delete it. > _______________________________________________ > networkmanager-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/networkmanager-list > _______________________________________________ networkmanager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
