How can I make local dnsmasq play nicely with NetworkManager?

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

 



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.

NetworkManager creates a resolv.conf file that contains only the servers
returned by DHCP.  That does not allow queries from local processes to
be routed through the local caching resolver.

Without NetworkManager, I would just put a line in dhclient.conf to
prepend "127.0.0.1" to the list of nameservers returned by DHCP.
dnsmasq would then read resolv.conf, nicely ignore that entry, and use
the other nameserver entries as upstream servers.  NetworkManager always
invokes dhclient with a custom config file that is created anew for each
invocation, and gives no means to add this customization.

If I configure NetworkManager to put "127.0.0.1" as a nameserver in
resolv.conf, then _only_ that nameserver will appear, and dnsmasq has
no way to discover the upstream servers.

I cannot simply hard code the upstream servers in /etc/dnsmasq.conf
because that would ignore what DHCP returns.

I can put a script in /etc/NetworkManager/dispatcher.d/ to modify
resolv.conf to my liking, but that script does not get invoked for lease
renewals, at which time dhclient would undo my changes.

Getting rid of NetworkManager really isn't a viable option for a laptop
that needs to connect to various WiFi networks.

I find it hard to believe nobody's run into this before, but my searches
on Google have been fruitless.  Looking for suggestions before I go
complain on the NetworkManager developers list.

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

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux