View previous topic :: View next topic |
Author |
Message |
Jusong n00b
Joined: 06 Nov 2012 Posts: 11
|
Posted: Fri Oct 21, 2016 8:30 am Post subject: [SOLVED]NetworkManager not work with dnsmasq |
|
|
i set /etc/NetworkManager/NetworkManager.conf follow the instructions in the wiki https://wiki.gentoo.org/wiki/NetworkManager#Dnsmasq
Code: |
[main]
plugins=keyfile
dns=dnsmasq
|
then restart NetworkManger,and cat /etc/reslov.conf got
Code: | nameserver 127.0.0.1 |
use dig to test dnsmasq is ok,but after a while the /etc/reslov.conf changed to
Code: | nameserver 10.0.0.1 |
and dig test that dns server is 10.0.0.1, dnsmasq not work, i don't know why the file of /etc/reslov.conf changed automatic, anybody can help me?
Last edited by Jusong on Tue Oct 25, 2016 6:48 am; edited 3 times in total |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Fri Oct 21, 2016 8:35 am Post subject: |
|
|
So what is your question? |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Fri Oct 21, 2016 8:36 am Post subject: |
|
|
Moved to the Chinese subforum _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Fri Oct 21, 2016 9:07 am Post subject: |
|
|
Re-moved to an english sub-forum _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
Jusong n00b
Joined: 06 Nov 2012 Posts: 11
|
Posted: Fri Oct 21, 2016 9:10 am Post subject: |
|
|
xaviermiller wrote: | Re-moved to an english sub-forum |
thanks |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Fri Oct 21, 2016 7:16 pm Post subject: |
|
|
NetworkManager can write in /etc/resolv.conf but other applications can do it too like Dnsmasq itself, Dhcpcd, Dhclient and Resolvconf. If NetworkManager have some configured connexions it can write again in /etc/resolv.conf using a Dhcp client for example. The configuration of Dnsmasq can do so too. Most applications who touch /etc/resolv.conf can be configure to not write in.
I suppose that Dnsmasq have some public Dns servers in it's configuration to resolv domain names because, 127.0.0.1 resolv nothing unless it lead to Named and it's public Dns servers for the resolution.
You can have a more precise idea of what is running related to the domain names resolution with the command
Code: | ps aux | grep -i -e dh -e dns -e name -e net -e reso -e wpa |
_________________ Paul |
|
Back to top |
|
|
Jusong n00b
Joined: 06 Nov 2012 Posts: 11
|
Posted: Tue Oct 25, 2016 5:42 am Post subject: |
|
|
Logicien wrote: | NetworkManager can write in /etc/resolv.conf but other applications can do it too like Dnsmasq itself, Dhcpcd, Dhclient and Resolvconf. If NetworkManager have some configured connexions it can write again in /etc/resolv.conf using a Dhcp client for example. The configuration of Dnsmasq can do so too. Most applications who touch /etc/resolv.conf can be configure to not write in.
I suppose that Dnsmasq have some public Dns servers in it's configuration to resolv domain names because, 127.0.0.1 resolv nothing unless it lead to Named and it's public Dns servers for the resolution.
You can have a more precise idea of what is running related to the domain names resolution with the command
Code: | ps aux | grep -i -e dh -e dns -e name -e net -e reso -e wpa |
|
the output:
Code: |
root 2141 0.0 0.3 581780 13704 ? Ssl 10:00 0:04 /usr/sbin/NetworkManager --no-daemon
root 2203 0.0 0.1 36716 5700 ? Ss 10:00 0:01 /usr/sbin/wpa_supplicant -u
root 2244 0.0 0.2 16816 9736 ? S 10:00 0:00 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /run/dhclient-wlp4s0.pid -lf /var/lib/NetworkManager/dhclient-b3dbbb03-03f4-4cd8-a3b5-fd0ca87186e2-wlp4s0.lease -cf /var/lib/NetworkManager/dhclient-wlp4s0.conf wlp4s0
|
there is dhclient work with my NM, i try to uncomment below line in /etc/dhcp/dhclient.conf
Code: | prepend domain-name-servers 127.0.0.1; |
and then restart NM, exec cat /etc/resolv.conf got
Code: | # Generated by NetworkManager
nameserver 127.0.0.1
nameserver 10.0.0.1 |
and dig www.gentoo.org show that dns server is 127.0.0.1, so it looks like work well, thanks for your reminder |
|
Back to top |
|
|
|