avoid DNSMASQ making changes in resolv.confresolv.conf auto reset by dnsmasq after install libvirt-binConfigure NetworkManager's dnsmasq to use /etc/hostsdnsmasq disabled on Network ManagerAllow domain to be accessed from local area network instead of IP address using DnsmasqDNSMasq resolving not working on Ubuntu 16.04Dnsmasq does not resolve alias on Ubuntu 18 clients
Search for arbitrary files but only list matches in results once
Can Mathematica provide a reliable estimate of the numerical error from NDSolve?
Will transcribing music improve my ability to play a song by ear?
Is it possible to find out the probability of a type 2 error in 2 sample t test?
What's the girl's name?
Is there a conflict between YAGNI and SRP?
Could anyone explain this 置く置かない to me please
Does every node has a whole copy of the blockchain?
How do you say "to play Devil's advocate" in German?
Are these pigtails inside the panel and outside a junction box allowed?
My code seems to be a train wreck
how to write a condition for all elements of a list
How are names of enharmonic notes determined?
Is there any canon reason why urban werewolves haven't destroyed vampires (or vice versa)?
Should high school teachers say “real numbers” before teaching complex numbers?
Restore from SQL Server 2008 to 2014
Is Communism intrinsically Authoritarian?
What is the point of teaching Coding and robotics to kids as young as 6 years old?
Color coding Alerts
Limitations for Colour Usage in NTSC
Can Alice win the game?
Decode the Dreaded Alphabet Cypher™️
Germany's Ladenschlussgesetz in comparison to a debatable law in Israel
Can I travel to UK as a cabin crew after being refused entry to Ireland?
avoid DNSMASQ making changes in resolv.conf
resolv.conf auto reset by dnsmasq after install libvirt-binConfigure NetworkManager's dnsmasq to use /etc/hostsdnsmasq disabled on Network ManagerAllow domain to be accessed from local area network instead of IP address using DnsmasqDNSMasq resolving not working on Ubuntu 16.04Dnsmasq does not resolve alias on Ubuntu 18 clients
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
not able to find a workaround for the dnsmasq to not make changes in /etc/resolv.conf file.
editing the init.d/dnsmasq file is not a full option as not on all ubuntu version dnsmasq runs through init.d
hope you can help !
dnsmasq
add a comment
|
not able to find a workaround for the dnsmasq to not make changes in /etc/resolv.conf file.
editing the init.d/dnsmasq file is not a full option as not on all ubuntu version dnsmasq runs through init.d
hope you can help !
dnsmasq
Found an interesting file /etc/resolvconf/update.d/dnsmasq . As for me , I've set my dns through /etc/dhcp/dhclient.conf, now no matter what , nm-tool reports that i use those dns servers that i specified. Want me to post it as an answer ?
– Sergiy Kolodyazhnyy
Apr 9 '15 at 8:50
if you could describe a bit more throughout i would be grateful. as an answer would be great !
– Vitalik Jimbei
Apr 9 '15 at 9:32
i came to find that on those versions of dnsmasq without the daemon in init.d , there is no such file -- /etc/resolvconf/update.d/dnsmasq this is a file the daemon in init.d generates. i am looking for a workaround in these specific folders which remain no matter dnsmasq and ubuntu version -- /etc/dnsmasq.conf or or /etc/default/dnsmasq
– Vitalik Jimbei
Apr 9 '15 at 9:38
add a comment
|
not able to find a workaround for the dnsmasq to not make changes in /etc/resolv.conf file.
editing the init.d/dnsmasq file is not a full option as not on all ubuntu version dnsmasq runs through init.d
hope you can help !
dnsmasq
not able to find a workaround for the dnsmasq to not make changes in /etc/resolv.conf file.
editing the init.d/dnsmasq file is not a full option as not on all ubuntu version dnsmasq runs through init.d
hope you can help !
dnsmasq
dnsmasq
asked Apr 9 '15 at 7:57
Vitalik JimbeiVitalik Jimbei
2271 gold badge5 silver badges13 bronze badges
2271 gold badge5 silver badges13 bronze badges
Found an interesting file /etc/resolvconf/update.d/dnsmasq . As for me , I've set my dns through /etc/dhcp/dhclient.conf, now no matter what , nm-tool reports that i use those dns servers that i specified. Want me to post it as an answer ?
– Sergiy Kolodyazhnyy
Apr 9 '15 at 8:50
if you could describe a bit more throughout i would be grateful. as an answer would be great !
– Vitalik Jimbei
Apr 9 '15 at 9:32
i came to find that on those versions of dnsmasq without the daemon in init.d , there is no such file -- /etc/resolvconf/update.d/dnsmasq this is a file the daemon in init.d generates. i am looking for a workaround in these specific folders which remain no matter dnsmasq and ubuntu version -- /etc/dnsmasq.conf or or /etc/default/dnsmasq
– Vitalik Jimbei
Apr 9 '15 at 9:38
add a comment
|
Found an interesting file /etc/resolvconf/update.d/dnsmasq . As for me , I've set my dns through /etc/dhcp/dhclient.conf, now no matter what , nm-tool reports that i use those dns servers that i specified. Want me to post it as an answer ?
– Sergiy Kolodyazhnyy
Apr 9 '15 at 8:50
if you could describe a bit more throughout i would be grateful. as an answer would be great !
– Vitalik Jimbei
Apr 9 '15 at 9:32
i came to find that on those versions of dnsmasq without the daemon in init.d , there is no such file -- /etc/resolvconf/update.d/dnsmasq this is a file the daemon in init.d generates. i am looking for a workaround in these specific folders which remain no matter dnsmasq and ubuntu version -- /etc/dnsmasq.conf or or /etc/default/dnsmasq
– Vitalik Jimbei
Apr 9 '15 at 9:38
Found an interesting file /etc/resolvconf/update.d/dnsmasq . As for me , I've set my dns through /etc/dhcp/dhclient.conf, now no matter what , nm-tool reports that i use those dns servers that i specified. Want me to post it as an answer ?
– Sergiy Kolodyazhnyy
Apr 9 '15 at 8:50
Found an interesting file /etc/resolvconf/update.d/dnsmasq . As for me , I've set my dns through /etc/dhcp/dhclient.conf, now no matter what , nm-tool reports that i use those dns servers that i specified. Want me to post it as an answer ?
– Sergiy Kolodyazhnyy
Apr 9 '15 at 8:50
if you could describe a bit more throughout i would be grateful. as an answer would be great !
– Vitalik Jimbei
Apr 9 '15 at 9:32
if you could describe a bit more throughout i would be grateful. as an answer would be great !
– Vitalik Jimbei
Apr 9 '15 at 9:32
i came to find that on those versions of dnsmasq without the daemon in init.d , there is no such file -- /etc/resolvconf/update.d/dnsmasq this is a file the daemon in init.d generates. i am looking for a workaround in these specific folders which remain no matter dnsmasq and ubuntu version -- /etc/dnsmasq.conf or or /etc/default/dnsmasq
– Vitalik Jimbei
Apr 9 '15 at 9:38
i came to find that on those versions of dnsmasq without the daemon in init.d , there is no such file -- /etc/resolvconf/update.d/dnsmasq this is a file the daemon in init.d generates. i am looking for a workaround in these specific folders which remain no matter dnsmasq and ubuntu version -- /etc/dnsmasq.conf or or /etc/default/dnsmasq
– Vitalik Jimbei
Apr 9 '15 at 9:38
add a comment
|
2 Answers
2
active
oldest
votes
Problem is because Network Manager uses dynamically your /etc/resolv.conf
with dnsmasq
Solution for you to change way how to resolve names. Try following
In /etc/NetworkManager/NetworkManager.conf
comment out the dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
no-auto-default=00:22:64:4E:6F:70,
[ifupdown]
managed=fals
and restart the NM service
sudo restart network-manager
With this /etc/resolv.conf
is no longer dependant on resolvconf
package and is updated based on the DNS entries of each connection in the Network Manager
Also you can add nameserver in /etc/resolv.conf
. If you not set dns in NM per connection this will be used
sudo nano /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8
Edit One
Stop the service resolvconf
sudo service resolvconf stop
disable it
update-rc.d resolvconf disable
disable resolvconf
to overwrite resolv.conf
create /etc/init/resolvconf.override
with single line manual
echo 'manual' | sudo tee /etc/init/resolvconf.override
remove symbolic link /etc/resolv.conf
rm /etc/resolv.conf
create resolv.conf
with static dns entry
echo "namserver x.x.x.x." > /etc/resolv.conf
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
You have myedit one
in answer
– 2707974
Apr 9 '15 at 8:38
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
|
show 1 more comment
This may or may not solve your problem, but I was having a similar problem where dnsmasq (well, actually the combo of dnsmasq and resolvconf) was rewriting my /etc/resolv.conf file and ignoring the dns-nameservers options that I set in /etc/network/interfaces.
What the problem turned out to be was that resolvconf would call dnsmasq to update the nameserver entries in resolv.conf, and then it seems that it would quit after that.
I got it to keep the dns-nameservers entries from /etc/network/interfaces by moving my interface (p+([0-9])p+([0-9])?(_+([0-9]))*
in my case) to before the "lo.dnsmasq" entry in /etc/resolvconf/interface-order. So now instead of getting "nameserver 127.0.0.1" as the first, last, and only nameserver entry in /etc/resolv.conf, I get
nameserver <ipaddr.frometc.network.interfaces>
nameserver <another.frometc.network.interfaces>
nameserver 127.0.0.1
search <domains from /etc/network/interfaces>
So now it seems that resolvconf runs, checks the interface order, and adds the entries from /etc/network/interfaces corresponding to the entries above "lo.dnsmasq", then calls a dnsmasq process to add those to the file, but that somehow works not quite right and it ignores any interfaces after that.
When I was trying to figure this out I searched, to no avail, about why dnsmasq was ignoring /etc/network/interfaces. (I was certain that dnsmasq was involved because this happened shortly after I installed dnsmasq) I am not sure if that solves your problem, but to me it seemed a little bit cleaner than just removing resolvconf.
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f607086%2favoid-dnsmasq-making-changes-in-resolv-conf%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Problem is because Network Manager uses dynamically your /etc/resolv.conf
with dnsmasq
Solution for you to change way how to resolve names. Try following
In /etc/NetworkManager/NetworkManager.conf
comment out the dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
no-auto-default=00:22:64:4E:6F:70,
[ifupdown]
managed=fals
and restart the NM service
sudo restart network-manager
With this /etc/resolv.conf
is no longer dependant on resolvconf
package and is updated based on the DNS entries of each connection in the Network Manager
Also you can add nameserver in /etc/resolv.conf
. If you not set dns in NM per connection this will be used
sudo nano /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8
Edit One
Stop the service resolvconf
sudo service resolvconf stop
disable it
update-rc.d resolvconf disable
disable resolvconf
to overwrite resolv.conf
create /etc/init/resolvconf.override
with single line manual
echo 'manual' | sudo tee /etc/init/resolvconf.override
remove symbolic link /etc/resolv.conf
rm /etc/resolv.conf
create resolv.conf
with static dns entry
echo "namserver x.x.x.x." > /etc/resolv.conf
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
You have myedit one
in answer
– 2707974
Apr 9 '15 at 8:38
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
|
show 1 more comment
Problem is because Network Manager uses dynamically your /etc/resolv.conf
with dnsmasq
Solution for you to change way how to resolve names. Try following
In /etc/NetworkManager/NetworkManager.conf
comment out the dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
no-auto-default=00:22:64:4E:6F:70,
[ifupdown]
managed=fals
and restart the NM service
sudo restart network-manager
With this /etc/resolv.conf
is no longer dependant on resolvconf
package and is updated based on the DNS entries of each connection in the Network Manager
Also you can add nameserver in /etc/resolv.conf
. If you not set dns in NM per connection this will be used
sudo nano /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8
Edit One
Stop the service resolvconf
sudo service resolvconf stop
disable it
update-rc.d resolvconf disable
disable resolvconf
to overwrite resolv.conf
create /etc/init/resolvconf.override
with single line manual
echo 'manual' | sudo tee /etc/init/resolvconf.override
remove symbolic link /etc/resolv.conf
rm /etc/resolv.conf
create resolv.conf
with static dns entry
echo "namserver x.x.x.x." > /etc/resolv.conf
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
You have myedit one
in answer
– 2707974
Apr 9 '15 at 8:38
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
|
show 1 more comment
Problem is because Network Manager uses dynamically your /etc/resolv.conf
with dnsmasq
Solution for you to change way how to resolve names. Try following
In /etc/NetworkManager/NetworkManager.conf
comment out the dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
no-auto-default=00:22:64:4E:6F:70,
[ifupdown]
managed=fals
and restart the NM service
sudo restart network-manager
With this /etc/resolv.conf
is no longer dependant on resolvconf
package and is updated based on the DNS entries of each connection in the Network Manager
Also you can add nameserver in /etc/resolv.conf
. If you not set dns in NM per connection this will be used
sudo nano /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8
Edit One
Stop the service resolvconf
sudo service resolvconf stop
disable it
update-rc.d resolvconf disable
disable resolvconf
to overwrite resolv.conf
create /etc/init/resolvconf.override
with single line manual
echo 'manual' | sudo tee /etc/init/resolvconf.override
remove symbolic link /etc/resolv.conf
rm /etc/resolv.conf
create resolv.conf
with static dns entry
echo "namserver x.x.x.x." > /etc/resolv.conf
Problem is because Network Manager uses dynamically your /etc/resolv.conf
with dnsmasq
Solution for you to change way how to resolve names. Try following
In /etc/NetworkManager/NetworkManager.conf
comment out the dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
no-auto-default=00:22:64:4E:6F:70,
[ifupdown]
managed=fals
and restart the NM service
sudo restart network-manager
With this /etc/resolv.conf
is no longer dependant on resolvconf
package and is updated based on the DNS entries of each connection in the Network Manager
Also you can add nameserver in /etc/resolv.conf
. If you not set dns in NM per connection this will be used
sudo nano /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8
Edit One
Stop the service resolvconf
sudo service resolvconf stop
disable it
update-rc.d resolvconf disable
disable resolvconf
to overwrite resolv.conf
create /etc/init/resolvconf.override
with single line manual
echo 'manual' | sudo tee /etc/init/resolvconf.override
remove symbolic link /etc/resolv.conf
rm /etc/resolv.conf
create resolv.conf
with static dns entry
echo "namserver x.x.x.x." > /etc/resolv.conf
edited Apr 9 '15 at 8:38
answered Apr 9 '15 at 8:01
27079742707974
8,5766 gold badges24 silver badges40 bronze badges
8,5766 gold badges24 silver badges40 bronze badges
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
You have myedit one
in answer
– 2707974
Apr 9 '15 at 8:38
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
|
show 1 more comment
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
You have myedit one
in answer
– 2707974
Apr 9 '15 at 8:38
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
i don't have such file /etc/NetworkManager/NetworkManager.conf
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
should i install network manager ??
– Vitalik Jimbei
Apr 9 '15 at 8:16
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
network manager does not help. commenting out the conf file of network manager file does nothing for me. the init.d of dnsmasq still edits the resolv.conf file and uses the echo-ed nameserver and the dns servers of the IPv6 protocol
– Vitalik Jimbei
Apr 9 '15 at 8:35
You have my
edit one
in answer– 2707974
Apr 9 '15 at 8:38
You have my
edit one
in answer– 2707974
Apr 9 '15 at 8:38
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
is there maybe an option i can add in /etc/dnsmasq.conf or /etc/dnsmasq.d or /etc/default/dnsmasq than does the same thing ?
– Vitalik Jimbei
Apr 9 '15 at 8:51
|
show 1 more comment
This may or may not solve your problem, but I was having a similar problem where dnsmasq (well, actually the combo of dnsmasq and resolvconf) was rewriting my /etc/resolv.conf file and ignoring the dns-nameservers options that I set in /etc/network/interfaces.
What the problem turned out to be was that resolvconf would call dnsmasq to update the nameserver entries in resolv.conf, and then it seems that it would quit after that.
I got it to keep the dns-nameservers entries from /etc/network/interfaces by moving my interface (p+([0-9])p+([0-9])?(_+([0-9]))*
in my case) to before the "lo.dnsmasq" entry in /etc/resolvconf/interface-order. So now instead of getting "nameserver 127.0.0.1" as the first, last, and only nameserver entry in /etc/resolv.conf, I get
nameserver <ipaddr.frometc.network.interfaces>
nameserver <another.frometc.network.interfaces>
nameserver 127.0.0.1
search <domains from /etc/network/interfaces>
So now it seems that resolvconf runs, checks the interface order, and adds the entries from /etc/network/interfaces corresponding to the entries above "lo.dnsmasq", then calls a dnsmasq process to add those to the file, but that somehow works not quite right and it ignores any interfaces after that.
When I was trying to figure this out I searched, to no avail, about why dnsmasq was ignoring /etc/network/interfaces. (I was certain that dnsmasq was involved because this happened shortly after I installed dnsmasq) I am not sure if that solves your problem, but to me it seemed a little bit cleaner than just removing resolvconf.
add a comment
|
This may or may not solve your problem, but I was having a similar problem where dnsmasq (well, actually the combo of dnsmasq and resolvconf) was rewriting my /etc/resolv.conf file and ignoring the dns-nameservers options that I set in /etc/network/interfaces.
What the problem turned out to be was that resolvconf would call dnsmasq to update the nameserver entries in resolv.conf, and then it seems that it would quit after that.
I got it to keep the dns-nameservers entries from /etc/network/interfaces by moving my interface (p+([0-9])p+([0-9])?(_+([0-9]))*
in my case) to before the "lo.dnsmasq" entry in /etc/resolvconf/interface-order. So now instead of getting "nameserver 127.0.0.1" as the first, last, and only nameserver entry in /etc/resolv.conf, I get
nameserver <ipaddr.frometc.network.interfaces>
nameserver <another.frometc.network.interfaces>
nameserver 127.0.0.1
search <domains from /etc/network/interfaces>
So now it seems that resolvconf runs, checks the interface order, and adds the entries from /etc/network/interfaces corresponding to the entries above "lo.dnsmasq", then calls a dnsmasq process to add those to the file, but that somehow works not quite right and it ignores any interfaces after that.
When I was trying to figure this out I searched, to no avail, about why dnsmasq was ignoring /etc/network/interfaces. (I was certain that dnsmasq was involved because this happened shortly after I installed dnsmasq) I am not sure if that solves your problem, but to me it seemed a little bit cleaner than just removing resolvconf.
add a comment
|
This may or may not solve your problem, but I was having a similar problem where dnsmasq (well, actually the combo of dnsmasq and resolvconf) was rewriting my /etc/resolv.conf file and ignoring the dns-nameservers options that I set in /etc/network/interfaces.
What the problem turned out to be was that resolvconf would call dnsmasq to update the nameserver entries in resolv.conf, and then it seems that it would quit after that.
I got it to keep the dns-nameservers entries from /etc/network/interfaces by moving my interface (p+([0-9])p+([0-9])?(_+([0-9]))*
in my case) to before the "lo.dnsmasq" entry in /etc/resolvconf/interface-order. So now instead of getting "nameserver 127.0.0.1" as the first, last, and only nameserver entry in /etc/resolv.conf, I get
nameserver <ipaddr.frometc.network.interfaces>
nameserver <another.frometc.network.interfaces>
nameserver 127.0.0.1
search <domains from /etc/network/interfaces>
So now it seems that resolvconf runs, checks the interface order, and adds the entries from /etc/network/interfaces corresponding to the entries above "lo.dnsmasq", then calls a dnsmasq process to add those to the file, but that somehow works not quite right and it ignores any interfaces after that.
When I was trying to figure this out I searched, to no avail, about why dnsmasq was ignoring /etc/network/interfaces. (I was certain that dnsmasq was involved because this happened shortly after I installed dnsmasq) I am not sure if that solves your problem, but to me it seemed a little bit cleaner than just removing resolvconf.
This may or may not solve your problem, but I was having a similar problem where dnsmasq (well, actually the combo of dnsmasq and resolvconf) was rewriting my /etc/resolv.conf file and ignoring the dns-nameservers options that I set in /etc/network/interfaces.
What the problem turned out to be was that resolvconf would call dnsmasq to update the nameserver entries in resolv.conf, and then it seems that it would quit after that.
I got it to keep the dns-nameservers entries from /etc/network/interfaces by moving my interface (p+([0-9])p+([0-9])?(_+([0-9]))*
in my case) to before the "lo.dnsmasq" entry in /etc/resolvconf/interface-order. So now instead of getting "nameserver 127.0.0.1" as the first, last, and only nameserver entry in /etc/resolv.conf, I get
nameserver <ipaddr.frometc.network.interfaces>
nameserver <another.frometc.network.interfaces>
nameserver 127.0.0.1
search <domains from /etc/network/interfaces>
So now it seems that resolvconf runs, checks the interface order, and adds the entries from /etc/network/interfaces corresponding to the entries above "lo.dnsmasq", then calls a dnsmasq process to add those to the file, but that somehow works not quite right and it ignores any interfaces after that.
When I was trying to figure this out I searched, to no avail, about why dnsmasq was ignoring /etc/network/interfaces. (I was certain that dnsmasq was involved because this happened shortly after I installed dnsmasq) I am not sure if that solves your problem, but to me it seemed a little bit cleaner than just removing resolvconf.
answered Aug 28 '15 at 23:36
Harold HallHarold Hall
1
1
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f607086%2favoid-dnsmasq-making-changes-in-resolv-conf%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Found an interesting file /etc/resolvconf/update.d/dnsmasq . As for me , I've set my dns through /etc/dhcp/dhclient.conf, now no matter what , nm-tool reports that i use those dns servers that i specified. Want me to post it as an answer ?
– Sergiy Kolodyazhnyy
Apr 9 '15 at 8:50
if you could describe a bit more throughout i would be grateful. as an answer would be great !
– Vitalik Jimbei
Apr 9 '15 at 9:32
i came to find that on those versions of dnsmasq without the daemon in init.d , there is no such file -- /etc/resolvconf/update.d/dnsmasq this is a file the daemon in init.d generates. i am looking for a workaround in these specific folders which remain no matter dnsmasq and ubuntu version -- /etc/dnsmasq.conf or or /etc/default/dnsmasq
– Vitalik Jimbei
Apr 9 '15 at 9:38