18.04: Bionic Beaver: enforce static /etc/resolv.conf












9














Previously, on Ubuntu 16.04, I felt betrayed when an Ubuntu update installed dnsmasq package, configured it, and gave it precedence over my own super-stable, ultra-fast, and own-configured BIND DNS server. It exactly felt as if Ubuntu hacked my workstation.



Since I happened to be working as a system admin, this was extremely unacceptable. This was a freak-out call. This is when you go to troubleshoot a problem and in one of your steps you use dig or nslookup and you get stunned to see the lo interface replying to you. PANIC



Is there a way to not only fix this issue, but also guarantee that /etc/resolv.conf will be tamper proof?










share|improve this question





























    9














    Previously, on Ubuntu 16.04, I felt betrayed when an Ubuntu update installed dnsmasq package, configured it, and gave it precedence over my own super-stable, ultra-fast, and own-configured BIND DNS server. It exactly felt as if Ubuntu hacked my workstation.



    Since I happened to be working as a system admin, this was extremely unacceptable. This was a freak-out call. This is when you go to troubleshoot a problem and in one of your steps you use dig or nslookup and you get stunned to see the lo interface replying to you. PANIC



    Is there a way to not only fix this issue, but also guarantee that /etc/resolv.conf will be tamper proof?










    share|improve this question



























      9












      9








      9


      7





      Previously, on Ubuntu 16.04, I felt betrayed when an Ubuntu update installed dnsmasq package, configured it, and gave it precedence over my own super-stable, ultra-fast, and own-configured BIND DNS server. It exactly felt as if Ubuntu hacked my workstation.



      Since I happened to be working as a system admin, this was extremely unacceptable. This was a freak-out call. This is when you go to troubleshoot a problem and in one of your steps you use dig or nslookup and you get stunned to see the lo interface replying to you. PANIC



      Is there a way to not only fix this issue, but also guarantee that /etc/resolv.conf will be tamper proof?










      share|improve this question















      Previously, on Ubuntu 16.04, I felt betrayed when an Ubuntu update installed dnsmasq package, configured it, and gave it precedence over my own super-stable, ultra-fast, and own-configured BIND DNS server. It exactly felt as if Ubuntu hacked my workstation.



      Since I happened to be working as a system admin, this was extremely unacceptable. This was a freak-out call. This is when you go to troubleshoot a problem and in one of your steps you use dig or nslookup and you get stunned to see the lo interface replying to you. PANIC



      Is there a way to not only fix this issue, but also guarantee that /etc/resolv.conf will be tamper proof?







      network-manager dns dnsmasq resolv.conf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 3 '18 at 0:14







      M K

















      asked May 2 '18 at 21:48









      M KM K

      6201414




      6201414






















          4 Answers
          4






          active

          oldest

          votes


















          3














          A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.



          To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:



          echo nameserver 8.8.8.8 > /etc/resolv.conf
          chattr -e /etc/resolv.conf
          chattr +i /etc/resolv.conf


          ...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.






          share|improve this answer































            0














            According to the docs, you can write your resolv.conf to /usr/lib/systemd/resolv.conf, which is a static file that can be linked from /etc/resolv.conf. That should not be rewritten.



            sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf


            http://manpages.ubuntu.com/manpages/bionic/man8/systemd-resolved.service.8.html#contenttoc3




            /ETC/RESOLV.CONF



            Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:



            ...



            A static file /usr/lib/systemd/resolv.conf is provided that lists the
            127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients
            that bypass local DNS APIs to systemd-resolved. This file does not
            contain any search domains.







            share|improve this answer

















            • 1




              No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
              – M K
              Jun 28 '18 at 23:59












            • How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
              – Marlon
              Aug 15 '18 at 2:18












            • @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
              – M K
              Oct 2 '18 at 7:02












            • If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
              – M K
              Oct 2 '18 at 7:09










            • Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
              – M K
              Oct 2 '18 at 7:13





















            0














            Best solution I've found is to prevent NetworkManager from updating /etc/resolv.conf and then creating a new /etc/resolv.conf file with a static DNS server. See https://www.ctrl.blog/entry/resolvconf-tutorial for how to do this.






            share|improve this answer





























              -1














              The file present is a symlink to another file.
              Delete the file



              rm /etc/resolve.conf
              vim /etc resolve.conf
              enter your data
              :wq


              The file is no longer a symlink but a persistent file.






              share|improve this answer





















              • Steps already direct to deleting /etc/resolv.conf beforehand.
                – M K
                Oct 25 '18 at 22:47











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


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031279%2f18-04-bionic-beaver-enforce-static-etc-resolv-conf%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              3














              A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.



              To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:



              echo nameserver 8.8.8.8 > /etc/resolv.conf
              chattr -e /etc/resolv.conf
              chattr +i /etc/resolv.conf


              ...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.






              share|improve this answer




























                3














                A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.



                To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:



                echo nameserver 8.8.8.8 > /etc/resolv.conf
                chattr -e /etc/resolv.conf
                chattr +i /etc/resolv.conf


                ...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.






                share|improve this answer


























                  3












                  3








                  3






                  A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.



                  To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:



                  echo nameserver 8.8.8.8 > /etc/resolv.conf
                  chattr -e /etc/resolv.conf
                  chattr +i /etc/resolv.conf


                  ...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.






                  share|improve this answer














                  A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.



                  To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:



                  echo nameserver 8.8.8.8 > /etc/resolv.conf
                  chattr -e /etc/resolv.conf
                  chattr +i /etc/resolv.conf


                  ...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 26 '18 at 17:12

























                  answered May 3 '18 at 0:17









                  M KM K

                  6201414




                  6201414

























                      0














                      According to the docs, you can write your resolv.conf to /usr/lib/systemd/resolv.conf, which is a static file that can be linked from /etc/resolv.conf. That should not be rewritten.



                      sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf


                      http://manpages.ubuntu.com/manpages/bionic/man8/systemd-resolved.service.8.html#contenttoc3




                      /ETC/RESOLV.CONF



                      Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:



                      ...



                      A static file /usr/lib/systemd/resolv.conf is provided that lists the
                      127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients
                      that bypass local DNS APIs to systemd-resolved. This file does not
                      contain any search domains.







                      share|improve this answer

















                      • 1




                        No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
                        – M K
                        Jun 28 '18 at 23:59












                      • How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
                        – Marlon
                        Aug 15 '18 at 2:18












                      • @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
                        – M K
                        Oct 2 '18 at 7:02












                      • If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
                        – M K
                        Oct 2 '18 at 7:09










                      • Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
                        – M K
                        Oct 2 '18 at 7:13


















                      0














                      According to the docs, you can write your resolv.conf to /usr/lib/systemd/resolv.conf, which is a static file that can be linked from /etc/resolv.conf. That should not be rewritten.



                      sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf


                      http://manpages.ubuntu.com/manpages/bionic/man8/systemd-resolved.service.8.html#contenttoc3




                      /ETC/RESOLV.CONF



                      Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:



                      ...



                      A static file /usr/lib/systemd/resolv.conf is provided that lists the
                      127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients
                      that bypass local DNS APIs to systemd-resolved. This file does not
                      contain any search domains.







                      share|improve this answer

















                      • 1




                        No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
                        – M K
                        Jun 28 '18 at 23:59












                      • How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
                        – Marlon
                        Aug 15 '18 at 2:18












                      • @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
                        – M K
                        Oct 2 '18 at 7:02












                      • If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
                        – M K
                        Oct 2 '18 at 7:09










                      • Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
                        – M K
                        Oct 2 '18 at 7:13
















                      0












                      0








                      0






                      According to the docs, you can write your resolv.conf to /usr/lib/systemd/resolv.conf, which is a static file that can be linked from /etc/resolv.conf. That should not be rewritten.



                      sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf


                      http://manpages.ubuntu.com/manpages/bionic/man8/systemd-resolved.service.8.html#contenttoc3




                      /ETC/RESOLV.CONF



                      Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:



                      ...



                      A static file /usr/lib/systemd/resolv.conf is provided that lists the
                      127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients
                      that bypass local DNS APIs to systemd-resolved. This file does not
                      contain any search domains.







                      share|improve this answer












                      According to the docs, you can write your resolv.conf to /usr/lib/systemd/resolv.conf, which is a static file that can be linked from /etc/resolv.conf. That should not be rewritten.



                      sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf


                      http://manpages.ubuntu.com/manpages/bionic/man8/systemd-resolved.service.8.html#contenttoc3




                      /ETC/RESOLV.CONF



                      Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:



                      ...



                      A static file /usr/lib/systemd/resolv.conf is provided that lists the
                      127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients
                      that bypass local DNS APIs to systemd-resolved. This file does not
                      contain any search domains.








                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jun 27 '18 at 23:00









                      wisbuckywisbucky

                      76498




                      76498








                      • 1




                        No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
                        – M K
                        Jun 28 '18 at 23:59












                      • How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
                        – Marlon
                        Aug 15 '18 at 2:18












                      • @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
                        – M K
                        Oct 2 '18 at 7:02












                      • If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
                        – M K
                        Oct 2 '18 at 7:09










                      • Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
                        – M K
                        Oct 2 '18 at 7:13
















                      • 1




                        No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
                        – M K
                        Jun 28 '18 at 23:59












                      • How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
                        – Marlon
                        Aug 15 '18 at 2:18












                      • @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
                        – M K
                        Oct 2 '18 at 7:02












                      • If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
                        – M K
                        Oct 2 '18 at 7:09










                      • Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
                        – M K
                        Oct 2 '18 at 7:13










                      1




                      1




                      No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
                      – M K
                      Jun 28 '18 at 23:59






                      No, sorry. What happens when the spec changes or config method alters on Ubuntu's own willing? You know, this is the same fiasco I left Satya's corrupted dreams of an OS for. And, this is the same fiasco that Linux should be avoiding. What's wrong with resolve.conf? Why the hassle? Why try mimic the hateful and tedious Redhat network config, in some way or another? Sorry, I will only stick to my solution.
                      – M K
                      Jun 28 '18 at 23:59














                      How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
                      – Marlon
                      Aug 15 '18 at 2:18






                      How do you know that your file wont simply be ignored in the future? I know that forcing the static way some apps would work and others wont. With wisbucky's solution, at least we can use the current way. I didnt see the need for them to change it either but I didnt get a vote. Someone downvoted this solution when in fact it does work and is the simplest. +1
                      – Marlon
                      Aug 15 '18 at 2:18














                      @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
                      – M K
                      Oct 2 '18 at 7:02






                      @Marlon "How do you know that your file wont simply be ignored in the future"? Because it is set immutable; and, if /etc/resolv.conf is going to be ignored, so why the fuss anyway building a framework around it?? Ignoring the file will only happen if some Ubuntu wacko decided it is useless (implementing something into interfaces file, for example!)
                      – M K
                      Oct 2 '18 at 7:02














                      If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
                      – M K
                      Oct 2 '18 at 7:09




                      If I wanted someone taking decisions for me, I would have gone back to the wacko Microsoft Windows, whose coders and designers and Satya above them all think they know your sake better than you do and that you have no right choosing how to run their "creation". Fuss!
                      – M K
                      Oct 2 '18 at 7:09












                      Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
                      – M K
                      Oct 2 '18 at 7:13






                      Why the fuss build an OS for the good of mankind, if mankind cannot enjoy running it? What the fuss is Immutable attribute if someone is going to tell me when to use it or not. This is not about "following galactic manuals of Vega", this is about freedom of choice; no one should ever pose his own rigid single-minded impulse on you. You are a being and you have rights.
                      – M K
                      Oct 2 '18 at 7:13













                      0














                      Best solution I've found is to prevent NetworkManager from updating /etc/resolv.conf and then creating a new /etc/resolv.conf file with a static DNS server. See https://www.ctrl.blog/entry/resolvconf-tutorial for how to do this.






                      share|improve this answer


























                        0














                        Best solution I've found is to prevent NetworkManager from updating /etc/resolv.conf and then creating a new /etc/resolv.conf file with a static DNS server. See https://www.ctrl.blog/entry/resolvconf-tutorial for how to do this.






                        share|improve this answer
























                          0












                          0








                          0






                          Best solution I've found is to prevent NetworkManager from updating /etc/resolv.conf and then creating a new /etc/resolv.conf file with a static DNS server. See https://www.ctrl.blog/entry/resolvconf-tutorial for how to do this.






                          share|improve this answer












                          Best solution I've found is to prevent NetworkManager from updating /etc/resolv.conf and then creating a new /etc/resolv.conf file with a static DNS server. See https://www.ctrl.blog/entry/resolvconf-tutorial for how to do this.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 17 '18 at 19:24









                          ScubadooScubadoo

                          1




                          1























                              -1














                              The file present is a symlink to another file.
                              Delete the file



                              rm /etc/resolve.conf
                              vim /etc resolve.conf
                              enter your data
                              :wq


                              The file is no longer a symlink but a persistent file.






                              share|improve this answer





















                              • Steps already direct to deleting /etc/resolv.conf beforehand.
                                – M K
                                Oct 25 '18 at 22:47
















                              -1














                              The file present is a symlink to another file.
                              Delete the file



                              rm /etc/resolve.conf
                              vim /etc resolve.conf
                              enter your data
                              :wq


                              The file is no longer a symlink but a persistent file.






                              share|improve this answer





















                              • Steps already direct to deleting /etc/resolv.conf beforehand.
                                – M K
                                Oct 25 '18 at 22:47














                              -1












                              -1








                              -1






                              The file present is a symlink to another file.
                              Delete the file



                              rm /etc/resolve.conf
                              vim /etc resolve.conf
                              enter your data
                              :wq


                              The file is no longer a symlink but a persistent file.






                              share|improve this answer












                              The file present is a symlink to another file.
                              Delete the file



                              rm /etc/resolve.conf
                              vim /etc resolve.conf
                              enter your data
                              :wq


                              The file is no longer a symlink but a persistent file.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Oct 16 '18 at 16:15









                              0n10n_0n10n_

                              12




                              12












                              • Steps already direct to deleting /etc/resolv.conf beforehand.
                                – M K
                                Oct 25 '18 at 22:47


















                              • Steps already direct to deleting /etc/resolv.conf beforehand.
                                – M K
                                Oct 25 '18 at 22:47
















                              Steps already direct to deleting /etc/resolv.conf beforehand.
                              – M K
                              Oct 25 '18 at 22:47




                              Steps already direct to deleting /etc/resolv.conf beforehand.
                              – M K
                              Oct 25 '18 at 22:47


















                              draft saved

                              draft discarded




















































                              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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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%2faskubuntu.com%2fquestions%2f1031279%2f18-04-bionic-beaver-enforce-static-etc-resolv-conf%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

                              Quarter-circle Tiles

                              build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                              Mont Emei