ubuntu fails to resolve DNS












1















Recently I started to experience strange behavior of my computer -- my browser sometimes suddenly fails to load pages. I restarted my wlan0
(ip link set dev wlan0 up/down) and reconnected to wifi but this did not solve the problem. Then I tried to ping 8.8.8.8 and it worked! So it seems to me that DNS stopped working (judging by this picture, 192.30.253.112 is an ip of github.com)



enter image description here



Does anybody know what is happening and how can I solve it? For now I just reboot my PC and it starts working again.



PS while my browser does not work, skype and telegram work fine. Even browser on my phone works fine.



PPS my kernel version is 4.4.0-66-generic, my ubuntu version is 16.04










share|improve this question














bumped to the homepage by Community 9 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    1















    Recently I started to experience strange behavior of my computer -- my browser sometimes suddenly fails to load pages. I restarted my wlan0
    (ip link set dev wlan0 up/down) and reconnected to wifi but this did not solve the problem. Then I tried to ping 8.8.8.8 and it worked! So it seems to me that DNS stopped working (judging by this picture, 192.30.253.112 is an ip of github.com)



    enter image description here



    Does anybody know what is happening and how can I solve it? For now I just reboot my PC and it starts working again.



    PS while my browser does not work, skype and telegram work fine. Even browser on my phone works fine.



    PPS my kernel version is 4.4.0-66-generic, my ubuntu version is 16.04










    share|improve this question














    bumped to the homepage by Community 9 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1








      Recently I started to experience strange behavior of my computer -- my browser sometimes suddenly fails to load pages. I restarted my wlan0
      (ip link set dev wlan0 up/down) and reconnected to wifi but this did not solve the problem. Then I tried to ping 8.8.8.8 and it worked! So it seems to me that DNS stopped working (judging by this picture, 192.30.253.112 is an ip of github.com)



      enter image description here



      Does anybody know what is happening and how can I solve it? For now I just reboot my PC and it starts working again.



      PS while my browser does not work, skype and telegram work fine. Even browser on my phone works fine.



      PPS my kernel version is 4.4.0-66-generic, my ubuntu version is 16.04










      share|improve this question














      Recently I started to experience strange behavior of my computer -- my browser sometimes suddenly fails to load pages. I restarted my wlan0
      (ip link set dev wlan0 up/down) and reconnected to wifi but this did not solve the problem. Then I tried to ping 8.8.8.8 and it worked! So it seems to me that DNS stopped working (judging by this picture, 192.30.253.112 is an ip of github.com)



      enter image description here



      Does anybody know what is happening and how can I solve it? For now I just reboot my PC and it starts working again.



      PS while my browser does not work, skype and telegram work fine. Even browser on my phone works fine.



      PPS my kernel version is 4.4.0-66-generic, my ubuntu version is 16.04







      networking dns






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 15 '17 at 18:48









      PepeHandsPepeHands

      202313




      202313





      bumped to the homepage by Community 9 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 9 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          If ANY DNS lookup resolves then DNS is probably ok.



          In your example you can ping 192.30.253.112 which is in the github network but that does not mean that this is the server that your DNS will resolve to.



          In my case:



          dig github.com returns 192.30.253.113



          To isolate your issue, when your browser is unable to load a page, type:



          nslookup desired_url



          If you can't ping the IP that nslookup returns, the server is probably down (or you are being blocked).



          If you can ping the IP but the page never loads you are probably being blocked or the site is having some sort of problem. There are a variety of reasons why a site may block you.



          If other Internet apps like Skype work but your browser doesn't, I'd be looking at your browser configuration or addons that might be causing problems.






          share|improve this answer
























          • Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

            – PepeHands
            Mar 15 '17 at 19:37











          • Also dig github.com returns me both 112 and 113

            – PepeHands
            Mar 15 '17 at 19:38











          • I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

            – jones0610
            Mar 15 '17 at 20:01











          • Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

            – PepeHands
            Mar 15 '17 at 23:21



















          0














          I found a simple workaround for this problem.



          echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf



          This command solves problem when it appears but I still doesn't know what causes it.






          share|improve this answer























            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%2f893404%2fubuntu-fails-to-resolve-dns%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









            0














            If ANY DNS lookup resolves then DNS is probably ok.



            In your example you can ping 192.30.253.112 which is in the github network but that does not mean that this is the server that your DNS will resolve to.



            In my case:



            dig github.com returns 192.30.253.113



            To isolate your issue, when your browser is unable to load a page, type:



            nslookup desired_url



            If you can't ping the IP that nslookup returns, the server is probably down (or you are being blocked).



            If you can ping the IP but the page never loads you are probably being blocked or the site is having some sort of problem. There are a variety of reasons why a site may block you.



            If other Internet apps like Skype work but your browser doesn't, I'd be looking at your browser configuration or addons that might be causing problems.






            share|improve this answer
























            • Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

              – PepeHands
              Mar 15 '17 at 19:37











            • Also dig github.com returns me both 112 and 113

              – PepeHands
              Mar 15 '17 at 19:38











            • I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

              – jones0610
              Mar 15 '17 at 20:01











            • Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

              – PepeHands
              Mar 15 '17 at 23:21
















            0














            If ANY DNS lookup resolves then DNS is probably ok.



            In your example you can ping 192.30.253.112 which is in the github network but that does not mean that this is the server that your DNS will resolve to.



            In my case:



            dig github.com returns 192.30.253.113



            To isolate your issue, when your browser is unable to load a page, type:



            nslookup desired_url



            If you can't ping the IP that nslookup returns, the server is probably down (or you are being blocked).



            If you can ping the IP but the page never loads you are probably being blocked or the site is having some sort of problem. There are a variety of reasons why a site may block you.



            If other Internet apps like Skype work but your browser doesn't, I'd be looking at your browser configuration or addons that might be causing problems.






            share|improve this answer
























            • Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

              – PepeHands
              Mar 15 '17 at 19:37











            • Also dig github.com returns me both 112 and 113

              – PepeHands
              Mar 15 '17 at 19:38











            • I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

              – jones0610
              Mar 15 '17 at 20:01











            • Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

              – PepeHands
              Mar 15 '17 at 23:21














            0












            0








            0







            If ANY DNS lookup resolves then DNS is probably ok.



            In your example you can ping 192.30.253.112 which is in the github network but that does not mean that this is the server that your DNS will resolve to.



            In my case:



            dig github.com returns 192.30.253.113



            To isolate your issue, when your browser is unable to load a page, type:



            nslookup desired_url



            If you can't ping the IP that nslookup returns, the server is probably down (or you are being blocked).



            If you can ping the IP but the page never loads you are probably being blocked or the site is having some sort of problem. There are a variety of reasons why a site may block you.



            If other Internet apps like Skype work but your browser doesn't, I'd be looking at your browser configuration or addons that might be causing problems.






            share|improve this answer













            If ANY DNS lookup resolves then DNS is probably ok.



            In your example you can ping 192.30.253.112 which is in the github network but that does not mean that this is the server that your DNS will resolve to.



            In my case:



            dig github.com returns 192.30.253.113



            To isolate your issue, when your browser is unable to load a page, type:



            nslookup desired_url



            If you can't ping the IP that nslookup returns, the server is probably down (or you are being blocked).



            If you can ping the IP but the page never loads you are probably being blocked or the site is having some sort of problem. There are a variety of reasons why a site may block you.



            If other Internet apps like Skype work but your browser doesn't, I'd be looking at your browser configuration or addons that might be causing problems.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 15 '17 at 19:06









            jones0610jones0610

            1,3421421




            1,3421421













            • Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

              – PepeHands
              Mar 15 '17 at 19:37











            • Also dig github.com returns me both 112 and 113

              – PepeHands
              Mar 15 '17 at 19:38











            • I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

              – jones0610
              Mar 15 '17 at 20:01











            • Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

              – PepeHands
              Mar 15 '17 at 23:21



















            • Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

              – PepeHands
              Mar 15 '17 at 19:37











            • Also dig github.com returns me both 112 and 113

              – PepeHands
              Mar 15 '17 at 19:38











            • I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

              – jones0610
              Mar 15 '17 at 20:01











            • Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

              – PepeHands
              Mar 15 '17 at 23:21

















            Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

            – PepeHands
            Mar 15 '17 at 19:37





            Actually ALL sites are blocked for me (while from our PCs I can reach them) and also it's not just 1 browser -- all of which I have (Chrome, Mozila, Opera) don't work.

            – PepeHands
            Mar 15 '17 at 19:37













            Also dig github.com returns me both 112 and 113

            – PepeHands
            Mar 15 '17 at 19:38





            Also dig github.com returns me both 112 and 113

            – PepeHands
            Mar 15 '17 at 19:38













            I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

            – jones0610
            Mar 15 '17 at 20:01





            I'm happy to chat with you about this via PM. My answer showed how to verify that DNS is working. It's rather clear, based on your response, that you do not have a DNS problem. If you can resolve the domain name with dig and if you can ping the IP it resolves to something in the browser(s) or the target web site is preventing a connection. You can eliminate GUI browsers and all of those plugins by trying: lynx github.com from a shell.

            – jones0610
            Mar 15 '17 at 20:01













            Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

            – PepeHands
            Mar 15 '17 at 23:21





            Well, I've already restarted my PC (to write this post e.g.) so I made this dig after rebooting (and thus everything worked fine). I just made it to verify that I used correct IP for github.

            – PepeHands
            Mar 15 '17 at 23:21













            0














            I found a simple workaround for this problem.



            echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf



            This command solves problem when it appears but I still doesn't know what causes it.






            share|improve this answer




























              0














              I found a simple workaround for this problem.



              echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf



              This command solves problem when it appears but I still doesn't know what causes it.






              share|improve this answer


























                0












                0








                0







                I found a simple workaround for this problem.



                echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf



                This command solves problem when it appears but I still doesn't know what causes it.






                share|improve this answer













                I found a simple workaround for this problem.



                echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf



                This command solves problem when it appears but I still doesn't know what causes it.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 24 '17 at 20:00









                PepeHandsPepeHands

                202313




                202313






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f893404%2fubuntu-fails-to-resolve-dns%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

                    GameSpot

                    日野市

                    Tu-95轟炸機