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













4















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
    9 hours ago















4















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
    9 hours ago













4












4








4


2






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












  • 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










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






























    3














    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





















              3














              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



























                3














                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

























                  3












                  3








                  3







                  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

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單