I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
On 05/10/2012 06:55 AM, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I turned if off long ago. I don't see any need for it unless maybe you have a laptop that you are carrying around to a lot of different environments.
My $.02
On 05/10/2012 01:07 PM, Steve Clark wrote:
On 05/10/2012 06:55 AM, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I turned if off long ago. I don't see any need for it unless maybe you have a laptop that you are carrying around to a lot of different environments.
My $.02
Same here. I even recompiled gnome-netstatus applet: http://rpms.plnet.rs/plnet-centos6-x86_64/RPMS.plnet-compiled/gnome-netstatu... so I can see status of connection.
On 10/05/12 20:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Have a look in
/etc/NetworkManager/dispatcher.d/11-dhclient
you might be able to figure out a tweak to put 127.0.0.1 back in.
Kal
On 05/11/2012 01:31 AM, Kahlil Hodgson wrote:
On 10/05/12 20:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Have a look in
/etc/NetworkManager/dispatcher.d/11-dhclient
you might be able to figure out a tweak to put 127.0.0.1 back in.
Yes, the script enumerates and runs the dhcp-plugin scripts in /etc/dhcp/dhclient.d/. I tried to create such a script there, but NetworkManager still does not run it.
What NM thinks it is doing remains a mystery ...
Thank you, Timothy Madden
On 11/05/12 21:05, Timothy Madden wrote:
On 05/11/2012 01:31 AM, Kahlil Hodgson wrote:
On 10/05/12 20:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Have a look in
/etc/NetworkManager/dispatcher.d/11-dhclient
you might be able to figure out a tweak to put 127.0.0.1 back in.
Yes, the script enumerates and runs the dhcp-plugin scripts in /etc/dhcp/dhclient.d/. I tried to create such a script there, but NetworkManager still does not run it.
So (a quick an dirty hack of) putting
echo 'nameserver 127.0.0.1' >> /etc/resolv.conf
at the end of that script doesn't help? Or does it need to go first?
Kal
On 14/05/12 09:04, Kahlil Hodgson wrote:
Have a look in
/etc/NetworkManager/dispatcher.d/11-dhclient
you might be able to figure out a tweak to put 127.0.0.1 back in.
Yes, the script enumerates and runs the dhcp-plugin scripts in /etc/dhcp/dhclient.d/. I tried to create such a script there, but NetworkManager still does not run it.
So (a quick an dirty hack of) putting
echo 'nameserver 127.0.0.1'>> /etc/resolv.conf
at the end of that script doesn't help? Or does it need to go first?
Kal
Actually I'm being brain-dead here. What I think you want is to edit the /etc/dhcp/dhclient.conf file and put something like
prepend domain-name-servers 127.0.0.1
in the appropriate place. See man page for dhclient.conf for more details.
Hope this helps.
Kal
On 10.05.2012 11:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I'm doind the same thing (running local cache) and NM works just fine. You should be setting NM to use the "DHCP (addresses only)" as in this image: http://img.nux.ro/4PsJ-dhcpnmlocaldns.png Put the upstream resolvers in some other file, e.g. /etc/nameservers and tell dnsmasq to get it's nameservers from there. Or just run a full fledge nameserver yourself and get rid of dnsmasq (I use pdns-recursor).
HTH
On 05/11/2012 11:14 AM, Nux! wrote:
On 10.05.2012 11:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I'm doind the same thing (running local cache) and NM works just fine. You should be setting NM to use the "DHCP (addresses only)" as in this image: http://img.nux.ro/4PsJ-dhcpnmlocaldns.png Put the upstream resolvers in some other file, e.g. /etc/nameservers and tell dnsmasq to get it's nameservers from there. Or just run a full fledge nameserver yourself and get rid of dnsmasq (I use pdns-recursor).
But if I make a separate file like /etc/nameservers than I will have to update it every time DHCP returns a different list of nameservers.
I tried to write a dhclient-exit-hooks script in /etc/dhcp that would generate that file, but guess what ? Network Manager supresses the normal dhclient script file ! (probably uses its own) I tried to add it back with DHCLIENTARGS="-sf /sbin/dhclient-script" with no effect, because NetworkManager takes care that such an approach would not work !
And if I try to read some documentation about how NetworkManager would achieve the same effect, there is nothing clear in its manual pages, you can only find some (vague) settings about NM plugins.
How can such software be part of CentOS _base_ distribution ?
On 11.05.2012 11:16, Timothy Madden wrote:
On 05/11/2012 11:14 AM, Nux! wrote:
On 10.05.2012 11:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I'm doind the same thing (running local cache) and NM works just fine. You should be setting NM to use the "DHCP (addresses only)" as in this image: http://img.nux.ro/4PsJ-dhcpnmlocaldns.png Put the upstream resolvers in some other file, e.g. /etc/nameservers and tell dnsmasq to get it's nameservers from there. Or just run a full fledge nameserver yourself and get rid of dnsmasq (I use pdns-recursor).
But if I make a separate file like /etc/nameservers than I will have to update it every time DHCP returns a different list of nameservers.
I tried to write a dhclient-exit-hooks script in /etc/dhcp that would generate that file, but guess what ? Network Manager supresses the normal dhclient script file ! (probably uses its own) I tried to add it back with DHCLIENTARGS="-sf /sbin/dhclient-script" with no effect, because NetworkManager takes care that such an approach would not work !
And if I try to read some documentation about how NetworkManager would achieve the same effect, there is nothing clear in its manual pages, you can only find some (vague) settings about NM plugins.
How can such software be part of CentOS _base_ distribution ?
Well.. in many cases NM works well, hence it's presence in @base. Now I don't know how to solve your problem nor do I have time to investigate; all I can recommend is run a local dns cache (pdns-recursor, bind, tinydns etc).
On 05/11/2012 01:38 PM, Nux! wrote:
On 11.05.2012 11:16, Timothy Madden wrote:
On 05/11/2012 11:14 AM, Nux! wrote:
On 10.05.2012 11:55, Timothy Madden wrote:
I would like to use dnsmasq to cache nameserver query results, and I have set dhcp to prepend the 127.0.0.1 name-server to the list of nameservers. dnsmasq would then automatically exclude the localhost as a name server and use all the others from the list provided by dhcp.
But it was too nice to be true, because NetworkManager was there, ready to mess up anything I try to do, including the list of name servers that dhclient puts in /etc/resolv.conf.
Is there really no way to convince that idiotic piece of software that it suffered too much brain damage in order for it to manage even a simple eth0 interface, and that dhclient can properly take care of the resolver configuration by itself ?
Or do I have to turn it off entirely ?
Is there a better way to have dhclient write the list of DNS servers, that dnsmasq could then use ?
Thank you, Timothy Madden
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I'm doind the same thing (running local cache) and NM works just fine. You should be setting NM to use the "DHCP (addresses only)" as in this image: http://img.nux.ro/4PsJ-dhcpnmlocaldns.png Put the upstream resolvers in some other file, e.g. /etc/nameservers and tell dnsmasq to get it's nameservers from there. Or just run a full fledge nameserver yourself and get rid of dnsmasq (I use pdns-recursor).
But if I make a separate file like /etc/nameservers than I will have to update it every time DHCP returns a different list of nameservers.
I tried to write a dhclient-exit-hooks script in /etc/dhcp that would generate that file, but guess what ? Network Manager supresses the normal dhclient script file ! (probably uses its own) I tried to add it back with DHCLIENTARGS="-sf /sbin/dhclient-script" with no effect, because NetworkManager takes care that such an approach would not work !
And if I try to read some documentation about how NetworkManager would achieve the same effect, there is nothing clear in its manual pages, you can only find some (vague) settings about NM plugins.
How can such software be part of CentOS _base_ distribution ?
Well.. in many cases NM works well, hence it's presence in @base. Now I don't know how to solve your problem nor do I have time to investigate; all I can recommend is run a local dns cache (pdns-recursor, bind, tinydns etc).
Whatever my namer server is (bind or dnsmasq) I still want to read the nameservers listed by DHCP, to pass them to it, and I still NM to allow DHCP to list its nameservers, but to only write 127.0.0.1 in /etc/resolv.conf.
So the way I see it, the problem is not dnsmasq, it is the lack of options in NM.
Thank you for your support, Timothy Madden
On Friday, May 11, 2012 06:16:44 AM Timothy Madden wrote:
How can such software be part of CentOS _base_ distribution ?
Upstream put it there; CentOS simply replicates upstream's behavior (bug for bug compatibility is one of the distribution's goals, after all).
You would need to file a bugzilla with upstream to get the behavior changed.
As dnsmasq is shipped upstream (I just verified with my own upstream EL6 machine), it should be in a usable condition as shipped.