avoid DNSMASQ making changes in resolv.conf
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
1151312
1151312
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/3.0/"u003ecc by-sa 3.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,00352138
8,00352138
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