What overwrites /etc/resolv.conf roughly every hour?What overwrites /etc/resolv.conf on every boot?How to stop dhclient from updating resolvconf on Debian?How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?resolv.conf overwritten every timeWhat overwrites /etc/resolv.conf on every boot?File /etc/resolv.conf deleted on every reboot, why or what?What is the use of sortlist option in /etc/resolv.conf?What's the “right way” to effect changes in /etc/resolv.conf with /etc/resolv.conf.d in place?SSH won't work before manually restarting networking.servicegrub recovery mode: etc/resolv.conf: no such file or directoryWho reads /etc/resolv.conf?resolv.conf overwritten every timeHow shall I understand the format of `/etc/resolv.conf`?How to auto populate /etc/resolv.conf when using a static configuration
Why are examinees often not allowed to leave during the start and end of an exam?
Can dual citizens open crypto exchange accounts where U.S. citizens are prohibited?
What prevents a US state from colonizing a smaller state?
What are the children of two Muggle-borns called?
Is it possible to alias a column based on the result of a select+where?
Find the closest three-digit hex colour
Where can I find my serialized Sitecore items?
Why will we fail creating a self sustaining off world colony?
Why am I getting an electric shock from the water in my hot tub?
Would skyscrapers tip over if people fell sideways?
Copy group of files (Filename*) to backup (Filename*.bak)
How to count the number of bytes in a file, grouping the same bytes?
Is it OK to say "The situation is pregnant with a crisis"?
Grid: different background color (of row) based on values
Why was Pan Am Flight 103 flying over Lockerbie?
Fully submerged water bath for stove top baking?
Why do movie directors use brown tint on Mexico cities?
Journal standards vs. personal standards
Early 2000s movie about time travel, protagonist travels back to save girlfriend, then into multiple points in future
English idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)
Could all three Gorgons turn people to stone, or just Medusa?
What overwrites /etc/resolv.conf roughly every hour?
How do I keep a running total of data in a column in Excel?
Could you fall off a planet if it was being accelerated by engines?
What overwrites /etc/resolv.conf roughly every hour?
What overwrites /etc/resolv.conf on every boot?How to stop dhclient from updating resolvconf on Debian?How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?resolv.conf overwritten every timeWhat overwrites /etc/resolv.conf on every boot?File /etc/resolv.conf deleted on every reboot, why or what?What is the use of sortlist option in /etc/resolv.conf?What's the “right way” to effect changes in /etc/resolv.conf with /etc/resolv.conf.d in place?SSH won't work before manually restarting networking.servicegrub recovery mode: etc/resolv.conf: no such file or directoryWho reads /etc/resolv.conf?resolv.conf overwritten every timeHow shall I understand the format of `/etc/resolv.conf`?How to auto populate /etc/resolv.conf when using a static configuration
I'm trying to add a search line to /etc/resolv.conf
I've added it directly, as an append
command in /etc/dhcp/dhclient.conf
and as a nameservers
block in /etc/netplan/50-cloud-init.yaml
.
After roughly an hour, the dhcp and netplan files are intact, but resolv.conf has reverted to not having my search.
I haven't changed /etc/network/interfaces
because it says "ifupdown has been replaced by netplan(5) on this system."
Any thoughts on what might be overwriting /etc/resolv.conf besides those two things?
This is ubuntu 18.04 on EC2.
ubuntu networking dns amazon-ec2 resolv.conf
add a comment |
I'm trying to add a search line to /etc/resolv.conf
I've added it directly, as an append
command in /etc/dhcp/dhclient.conf
and as a nameservers
block in /etc/netplan/50-cloud-init.yaml
.
After roughly an hour, the dhcp and netplan files are intact, but resolv.conf has reverted to not having my search.
I haven't changed /etc/network/interfaces
because it says "ifupdown has been replaced by netplan(5) on this system."
Any thoughts on what might be overwriting /etc/resolv.conf besides those two things?
This is ubuntu 18.04 on EC2.
ubuntu networking dns amazon-ec2 resolv.conf
4
does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P
– Rinzwind
9 hours ago
add a comment |
I'm trying to add a search line to /etc/resolv.conf
I've added it directly, as an append
command in /etc/dhcp/dhclient.conf
and as a nameservers
block in /etc/netplan/50-cloud-init.yaml
.
After roughly an hour, the dhcp and netplan files are intact, but resolv.conf has reverted to not having my search.
I haven't changed /etc/network/interfaces
because it says "ifupdown has been replaced by netplan(5) on this system."
Any thoughts on what might be overwriting /etc/resolv.conf besides those two things?
This is ubuntu 18.04 on EC2.
ubuntu networking dns amazon-ec2 resolv.conf
I'm trying to add a search line to /etc/resolv.conf
I've added it directly, as an append
command in /etc/dhcp/dhclient.conf
and as a nameservers
block in /etc/netplan/50-cloud-init.yaml
.
After roughly an hour, the dhcp and netplan files are intact, but resolv.conf has reverted to not having my search.
I haven't changed /etc/network/interfaces
because it says "ifupdown has been replaced by netplan(5) on this system."
Any thoughts on what might be overwriting /etc/resolv.conf besides those two things?
This is ubuntu 18.04 on EC2.
ubuntu networking dns amazon-ec2 resolv.conf
ubuntu networking dns amazon-ec2 resolv.conf
edited 7 hours ago
Gilles
561k134 gold badges1157 silver badges1663 bronze badges
561k134 gold badges1157 silver badges1663 bronze badges
asked 9 hours ago
dspeyerdspeyer
1385 bronze badges
1385 bronze badges
4
does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P
– Rinzwind
9 hours ago
add a comment |
4
does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P
– Rinzwind
9 hours ago
4
4
does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P
– Rinzwind
9 hours ago
does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P
– Rinzwind
9 hours ago
add a comment |
2 Answers
2
active
oldest
votes
/etc/resolv.conf
is a dynamic configuration file generated by the resolvconf process:
$ head /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
This file is generated from the files located under /etc/resolvconf/resolv.conf.d/
. To write your own changes to the contents of the /etc/resolv.conf
simply add the lines that you would usually add to the resolv.conf
file instead to the /etc/resolvconf/resolv.conf.d/base
file.
add a comment |
There is a complex fight to get control over the resolv.conf
file, it is an old fight.
Contenders that try to write a resolv.conf
are resolvconf, dhcp, interfaces, network manager and recently systemd-resolved. Other programs also may use resolv.conf
, like dnsmasq.
Thus, a simple solution doesn't work in all cases.
If you have the resolvconf program installed (which main goal is to take ownership of the
resolv.conf
file) then: un-install it.If your system use DHCP to get a working IP (most probably you do), every hour or so (depending on system configuration) the IP gets renewed, that re-writes
resolv.conf
. Detect if this is the source of the problem.The file
/etc/interfaces
may be used to change theresolv.conf
configuration. Find out if it is (and erase it).Network Manager
could be configured to change whatresolv.conf
does. Detect (and erase) if it is doing so.Systemd- resoved
may be configured to take control ofresolv.conf
via a sym-link. Remove the link if it exists.Some recomend to make resolv.conf not modifiable (I believe that is more a problem than a solution). Remove it if it exists.
After you have removed all the above: decide who should keep control of resolv.conf
file understanding that DHCP
must update the file when a new DHCP lease is obtained.
Ask for more help if needed.
Related:
- How to stop dhclient from updating resolvconf on Debian?
- How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?
- resolv.conf overwritten every time
- What overwrites /etc/resolv.conf on every boot?
- What causing resolv.conf overwritten ?
- CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf
- How do I include lines in resolv.conf that won't get lost on reboot?
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f527555%2fwhat-overwrites-etc-resolv-conf-roughly-every-hour%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
/etc/resolv.conf
is a dynamic configuration file generated by the resolvconf process:
$ head /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
This file is generated from the files located under /etc/resolvconf/resolv.conf.d/
. To write your own changes to the contents of the /etc/resolv.conf
simply add the lines that you would usually add to the resolv.conf
file instead to the /etc/resolvconf/resolv.conf.d/base
file.
add a comment |
/etc/resolv.conf
is a dynamic configuration file generated by the resolvconf process:
$ head /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
This file is generated from the files located under /etc/resolvconf/resolv.conf.d/
. To write your own changes to the contents of the /etc/resolv.conf
simply add the lines that you would usually add to the resolv.conf
file instead to the /etc/resolvconf/resolv.conf.d/base
file.
add a comment |
/etc/resolv.conf
is a dynamic configuration file generated by the resolvconf process:
$ head /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
This file is generated from the files located under /etc/resolvconf/resolv.conf.d/
. To write your own changes to the contents of the /etc/resolv.conf
simply add the lines that you would usually add to the resolv.conf
file instead to the /etc/resolvconf/resolv.conf.d/base
file.
/etc/resolv.conf
is a dynamic configuration file generated by the resolvconf process:
$ head /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
This file is generated from the files located under /etc/resolvconf/resolv.conf.d/
. To write your own changes to the contents of the /etc/resolv.conf
simply add the lines that you would usually add to the resolv.conf
file instead to the /etc/resolvconf/resolv.conf.d/base
file.
answered 8 hours ago
ThegsThegs
3861 silver badge8 bronze badges
3861 silver badge8 bronze badges
add a comment |
add a comment |
There is a complex fight to get control over the resolv.conf
file, it is an old fight.
Contenders that try to write a resolv.conf
are resolvconf, dhcp, interfaces, network manager and recently systemd-resolved. Other programs also may use resolv.conf
, like dnsmasq.
Thus, a simple solution doesn't work in all cases.
If you have the resolvconf program installed (which main goal is to take ownership of the
resolv.conf
file) then: un-install it.If your system use DHCP to get a working IP (most probably you do), every hour or so (depending on system configuration) the IP gets renewed, that re-writes
resolv.conf
. Detect if this is the source of the problem.The file
/etc/interfaces
may be used to change theresolv.conf
configuration. Find out if it is (and erase it).Network Manager
could be configured to change whatresolv.conf
does. Detect (and erase) if it is doing so.Systemd- resoved
may be configured to take control ofresolv.conf
via a sym-link. Remove the link if it exists.Some recomend to make resolv.conf not modifiable (I believe that is more a problem than a solution). Remove it if it exists.
After you have removed all the above: decide who should keep control of resolv.conf
file understanding that DHCP
must update the file when a new DHCP lease is obtained.
Ask for more help if needed.
Related:
- How to stop dhclient from updating resolvconf on Debian?
- How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?
- resolv.conf overwritten every time
- What overwrites /etc/resolv.conf on every boot?
- What causing resolv.conf overwritten ?
- CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf
- How do I include lines in resolv.conf that won't get lost on reboot?
add a comment |
There is a complex fight to get control over the resolv.conf
file, it is an old fight.
Contenders that try to write a resolv.conf
are resolvconf, dhcp, interfaces, network manager and recently systemd-resolved. Other programs also may use resolv.conf
, like dnsmasq.
Thus, a simple solution doesn't work in all cases.
If you have the resolvconf program installed (which main goal is to take ownership of the
resolv.conf
file) then: un-install it.If your system use DHCP to get a working IP (most probably you do), every hour or so (depending on system configuration) the IP gets renewed, that re-writes
resolv.conf
. Detect if this is the source of the problem.The file
/etc/interfaces
may be used to change theresolv.conf
configuration. Find out if it is (and erase it).Network Manager
could be configured to change whatresolv.conf
does. Detect (and erase) if it is doing so.Systemd- resoved
may be configured to take control ofresolv.conf
via a sym-link. Remove the link if it exists.Some recomend to make resolv.conf not modifiable (I believe that is more a problem than a solution). Remove it if it exists.
After you have removed all the above: decide who should keep control of resolv.conf
file understanding that DHCP
must update the file when a new DHCP lease is obtained.
Ask for more help if needed.
Related:
- How to stop dhclient from updating resolvconf on Debian?
- How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?
- resolv.conf overwritten every time
- What overwrites /etc/resolv.conf on every boot?
- What causing resolv.conf overwritten ?
- CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf
- How do I include lines in resolv.conf that won't get lost on reboot?
add a comment |
There is a complex fight to get control over the resolv.conf
file, it is an old fight.
Contenders that try to write a resolv.conf
are resolvconf, dhcp, interfaces, network manager and recently systemd-resolved. Other programs also may use resolv.conf
, like dnsmasq.
Thus, a simple solution doesn't work in all cases.
If you have the resolvconf program installed (which main goal is to take ownership of the
resolv.conf
file) then: un-install it.If your system use DHCP to get a working IP (most probably you do), every hour or so (depending on system configuration) the IP gets renewed, that re-writes
resolv.conf
. Detect if this is the source of the problem.The file
/etc/interfaces
may be used to change theresolv.conf
configuration. Find out if it is (and erase it).Network Manager
could be configured to change whatresolv.conf
does. Detect (and erase) if it is doing so.Systemd- resoved
may be configured to take control ofresolv.conf
via a sym-link. Remove the link if it exists.Some recomend to make resolv.conf not modifiable (I believe that is more a problem than a solution). Remove it if it exists.
After you have removed all the above: decide who should keep control of resolv.conf
file understanding that DHCP
must update the file when a new DHCP lease is obtained.
Ask for more help if needed.
Related:
- How to stop dhclient from updating resolvconf on Debian?
- How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?
- resolv.conf overwritten every time
- What overwrites /etc/resolv.conf on every boot?
- What causing resolv.conf overwritten ?
- CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf
- How do I include lines in resolv.conf that won't get lost on reboot?
There is a complex fight to get control over the resolv.conf
file, it is an old fight.
Contenders that try to write a resolv.conf
are resolvconf, dhcp, interfaces, network manager and recently systemd-resolved. Other programs also may use resolv.conf
, like dnsmasq.
Thus, a simple solution doesn't work in all cases.
If you have the resolvconf program installed (which main goal is to take ownership of the
resolv.conf
file) then: un-install it.If your system use DHCP to get a working IP (most probably you do), every hour or so (depending on system configuration) the IP gets renewed, that re-writes
resolv.conf
. Detect if this is the source of the problem.The file
/etc/interfaces
may be used to change theresolv.conf
configuration. Find out if it is (and erase it).Network Manager
could be configured to change whatresolv.conf
does. Detect (and erase) if it is doing so.Systemd- resoved
may be configured to take control ofresolv.conf
via a sym-link. Remove the link if it exists.Some recomend to make resolv.conf not modifiable (I believe that is more a problem than a solution). Remove it if it exists.
After you have removed all the above: decide who should keep control of resolv.conf
file understanding that DHCP
must update the file when a new DHCP lease is obtained.
Ask for more help if needed.
Related:
- How to stop dhclient from updating resolvconf on Debian?
- How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?
- resolv.conf overwritten every time
- What overwrites /etc/resolv.conf on every boot?
- What causing resolv.conf overwritten ?
- CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf
- How do I include lines in resolv.conf that won't get lost on reboot?
answered 5 hours ago
IsaacIsaac
13.7k1 gold badge22 silver badges59 bronze badges
13.7k1 gold badge22 silver badges59 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f527555%2fwhat-overwrites-etc-resolv-conf-roughly-every-hour%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
4
does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P
– Rinzwind
9 hours ago