How can I refresh resolv.conf after changing the resolv options in the interfaces file?











up vote
0
down vote

favorite












After bringing up a dhcp controlled instance in AWS I have made changes to the /etc/network/interfaces file for custom nameserver and DNS search strings:



auto lo
auto eth0
iface lo inet loopback
dns-nameservers 1.1.1.1 9.9.9.9
dns-search flapjacks.io flapjacks.net

iface eth0 inet dhcp


I was hoping to be able to restart a service to get resolv.conf to reflect these changes, but I do not know the service to restart... the changes do show up after reboot however. Does anyone know what service should update this?










share|improve this question


























    up vote
    0
    down vote

    favorite












    After bringing up a dhcp controlled instance in AWS I have made changes to the /etc/network/interfaces file for custom nameserver and DNS search strings:



    auto lo
    auto eth0
    iface lo inet loopback
    dns-nameservers 1.1.1.1 9.9.9.9
    dns-search flapjacks.io flapjacks.net

    iface eth0 inet dhcp


    I was hoping to be able to restart a service to get resolv.conf to reflect these changes, but I do not know the service to restart... the changes do show up after reboot however. Does anyone know what service should update this?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      After bringing up a dhcp controlled instance in AWS I have made changes to the /etc/network/interfaces file for custom nameserver and DNS search strings:



      auto lo
      auto eth0
      iface lo inet loopback
      dns-nameservers 1.1.1.1 9.9.9.9
      dns-search flapjacks.io flapjacks.net

      iface eth0 inet dhcp


      I was hoping to be able to restart a service to get resolv.conf to reflect these changes, but I do not know the service to restart... the changes do show up after reboot however. Does anyone know what service should update this?










      share|improve this question













      After bringing up a dhcp controlled instance in AWS I have made changes to the /etc/network/interfaces file for custom nameserver and DNS search strings:



      auto lo
      auto eth0
      iface lo inet loopback
      dns-nameservers 1.1.1.1 9.9.9.9
      dns-search flapjacks.io flapjacks.net

      iface eth0 inet dhcp


      I was hoping to be able to restart a service to get resolv.conf to reflect these changes, but I do not know the service to restart... the changes do show up after reboot however. Does anyone know what service should update this?







      networking server dns resolv.conf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Thaidog

      83




      83






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I suggest that you try:



          sudo ifdown eth0 && sudo ifup -v eth0


          The -v for verbose should produce sufficient outptut to see that the process completed successfully.






          share|improve this answer





















          • Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
            – Thaidog
            yesterday










          • Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
            – chili555
            yesterday










          • dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
            – Thaidog
            yesterday










          • I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
            – chili555
            yesterday










          • This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
            – Thaidog
            14 hours ago











          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',
          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%2f1092223%2fhow-can-i-refresh-resolv-conf-after-changing-the-resolv-options-in-the-interface%23new-answer', 'question_page');
          }
          );

          Post as a guest
































          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          I suggest that you try:



          sudo ifdown eth0 && sudo ifup -v eth0


          The -v for verbose should produce sufficient outptut to see that the process completed successfully.






          share|improve this answer





















          • Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
            – Thaidog
            yesterday










          • Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
            – chili555
            yesterday










          • dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
            – Thaidog
            yesterday










          • I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
            – chili555
            yesterday










          • This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
            – Thaidog
            14 hours ago















          up vote
          0
          down vote













          I suggest that you try:



          sudo ifdown eth0 && sudo ifup -v eth0


          The -v for verbose should produce sufficient outptut to see that the process completed successfully.






          share|improve this answer





















          • Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
            – Thaidog
            yesterday










          • Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
            – chili555
            yesterday










          • dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
            – Thaidog
            yesterday










          • I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
            – chili555
            yesterday










          • This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
            – Thaidog
            14 hours ago













          up vote
          0
          down vote










          up vote
          0
          down vote









          I suggest that you try:



          sudo ifdown eth0 && sudo ifup -v eth0


          The -v for verbose should produce sufficient outptut to see that the process completed successfully.






          share|improve this answer












          I suggest that you try:



          sudo ifdown eth0 && sudo ifup -v eth0


          The -v for verbose should produce sufficient outptut to see that the process completed successfully.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          chili555

          37.5k54976




          37.5k54976












          • Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
            – Thaidog
            yesterday










          • Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
            – chili555
            yesterday










          • dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
            – Thaidog
            yesterday










          • I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
            – chili555
            yesterday










          • This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
            – Thaidog
            14 hours ago


















          • Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
            – Thaidog
            yesterday










          • Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
            – chili555
            yesterday










          • dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
            – Thaidog
            yesterday










          • I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
            – chili555
            yesterday










          • This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
            – Thaidog
            14 hours ago
















          Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
          – Thaidog
          yesterday




          Didn't work. Looks to have restarted DHCP + ifup and ifdown but the resolv.conf has not been updated.
          – Thaidog
          yesterday












          Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
          – chili555
          yesterday




          Does resolv.conf contain 127.0.0.xx suggesting that dnsmasq is running? What does this report? sudo systemd-resolve --status It should show the DNS naeservers to be used in absence of a cached lookup previously supplied by dnsmasq. I doubt that you really want to bypass or disable dnsmasq.
          – chili555
          yesterday












          dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
          – Thaidog
          yesterday




          dnsmasq is not installed / running - and your command does not appear valid: "systemd-resolve: unrecognized option '--status'"
          – Thaidog
          yesterday












          I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
          – chili555
          yesterday




          I'm not sure what all you did to remove dnsmasq. Is systed running? ps aux | grep systemd Which version are you running? lsb-release -d and also: uname -r
          – chili555
          yesterday












          This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
          – Thaidog
          14 hours ago




          This is 16.04 LTS server - 4.4.0-131-generic - why would i need dnsmasq?
          – Thaidog
          14 hours ago


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1092223%2fhow-can-i-refresh-resolv-conf-after-changing-the-resolv-options-in-the-interface%23new-answer', 'question_page');
          }
          );

          Post as a guest




















































































          Popular posts from this blog

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents