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

What are the advantages and disadvantages of Manhattan-Style routing?

Tricolour nonogram

Did the Russian Empire have a claim to Sweden? Was there ever a time where they could have pursued it?

Why are symbols not written in words?

Do electrons really perform instantaneous quantum leaps?

Find the closest three-digit hex colour

Where can I find my serialized Sitecore items?

Copy group of files (Filename*) to backup (Filename*.bak)

What was the point of separating stdout and stderr?

Why was Pan Am Flight 103 flying over Lockerbie?

What verb for taking advantage fits in "I don't want to ________ on the friendship"?

How to count the number of bytes in a file, grouping the same bytes?

A* pathfinding algorithm too slow

German idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

Installed software from source, how to say yum not to install it from package?

Why didn't Caesar move against Sextus Pompey immediately after Munda?

Is it theoretically possible to hack printer using scanner tray?

How would one prevent political gerrymandering?

What happens if a caster is surprised while casting a spell with a long casting time?

How far can gerrymandering go?

How do I tell my girlfriend she's been buying me books by the wrong author for the last nine months?

What does 5d4 x 10 gp mean?

How useful would a hydroelectric power plant be in the post-apocalypse world?

Is leaving out prefixes like "rauf", "rüber", "rein" when describing movement considered a big mistake in spoken German?



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













3















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.










share|improve this question



















  • 4





    does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P

    – Rinzwind
    8 hours ago















3















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.










share|improve this question



















  • 4





    does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P

    – Rinzwind
    8 hours ago













3












3








3








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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago









Gilles

561k134 gold badges1157 silver badges1663 bronze badges




561k134 gold badges1157 silver badges1663 bronze badges










asked 8 hours ago









dspeyerdspeyer

1335 bronze badges




1335 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
    8 hours ago












  • 4





    does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P

    – Rinzwind
    8 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
8 hours ago





does yours not have a "This file is managed by man:systemd-resolved(8). Do not edit." at the top? :-P

– Rinzwind
8 hours ago










2 Answers
2






active

oldest

votes


















3














/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.






share|improve this answer






























    1














    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 the resolv.conf configuration. Find out if it is (and erase it).


    • Network Manager could be configured to change what resolv.conf does. Detect (and erase) if it is doing so.


    • Systemd- resoved may be configured to take control of resolv.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:



    1. How to stop dhclient from updating resolvconf on Debian?

    2. How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?

    3. resolv.conf overwritten every time

    4. What overwrites /etc/resolv.conf on every boot?

    5. What causing resolv.conf overwritten ?

    6. CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf

    7. How do I include lines in resolv.conf that won't get lost on reboot?





    share|improve this answer

























      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
      );



      );













      draft saved

      draft discarded


















      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









      3














      /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.






      share|improve this answer



























        3














        /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.






        share|improve this answer

























          3












          3








          3







          /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.






          share|improve this answer













          /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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          ThegsThegs

          3861 silver badge8 bronze badges




          3861 silver badge8 bronze badges





















              1














              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 the resolv.conf configuration. Find out if it is (and erase it).


              • Network Manager could be configured to change what resolv.conf does. Detect (and erase) if it is doing so.


              • Systemd- resoved may be configured to take control of resolv.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:



              1. How to stop dhclient from updating resolvconf on Debian?

              2. How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?

              3. resolv.conf overwritten every time

              4. What overwrites /etc/resolv.conf on every boot?

              5. What causing resolv.conf overwritten ?

              6. CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf

              7. How do I include lines in resolv.conf that won't get lost on reboot?





              share|improve this answer



























                1














                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 the resolv.conf configuration. Find out if it is (and erase it).


                • Network Manager could be configured to change what resolv.conf does. Detect (and erase) if it is doing so.


                • Systemd- resoved may be configured to take control of resolv.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:



                1. How to stop dhclient from updating resolvconf on Debian?

                2. How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?

                3. resolv.conf overwritten every time

                4. What overwrites /etc/resolv.conf on every boot?

                5. What causing resolv.conf overwritten ?

                6. CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf

                7. How do I include lines in resolv.conf that won't get lost on reboot?





                share|improve this answer

























                  1












                  1








                  1







                  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 the resolv.conf configuration. Find out if it is (and erase it).


                  • Network Manager could be configured to change what resolv.conf does. Detect (and erase) if it is doing so.


                  • Systemd- resoved may be configured to take control of resolv.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:



                  1. How to stop dhclient from updating resolvconf on Debian?

                  2. How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?

                  3. resolv.conf overwritten every time

                  4. What overwrites /etc/resolv.conf on every boot?

                  5. What causing resolv.conf overwritten ?

                  6. CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf

                  7. How do I include lines in resolv.conf that won't get lost on reboot?





                  share|improve this answer













                  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 the resolv.conf configuration. Find out if it is (and erase it).


                  • Network Manager could be configured to change what resolv.conf does. Detect (and erase) if it is doing so.


                  • Systemd- resoved may be configured to take control of resolv.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:



                  1. How to stop dhclient from updating resolvconf on Debian?

                  2. How do I stop Debian from overwriting /etc/resolv.conf and overwriting my VPN's nameservers?

                  3. resolv.conf overwritten every time

                  4. What overwrites /etc/resolv.conf on every boot?

                  5. What causing resolv.conf overwritten ?

                  6. CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf

                  7. How do I include lines in resolv.conf that won't get lost on reboot?






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 5 hours ago









                  IsaacIsaac

                  13.7k1 gold badge22 silver badges59 bronze badges




                  13.7k1 gold badge22 silver badges59 bronze badges



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

                      Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

                      19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу