Ubuntu 18.04 server unable to ping websites but can ping IP addresses












0















Total newbie here, got fed up with Windows world and gone over to the dark side



Yesterday I installed Ubuntu 18.4 LTS on VirtualBox with bridge connections.



It seems I can ping IP addresses internally, ping with IP addresses externally but when I try to resolve hostnames or websites, I can't.



rahim@websrv01ubuntu:~$ ping -c3 192.168.0.1PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.20 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=9.16 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.38 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 3.206/6.584/9.164/2.497 ms




rahim@websrv01ubuntu:~$ ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=34.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=121 time=27.8 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 22.980/28.526/34.788/4.849 ms
rahim@websrv01ubuntu:~$ ping -c3 websvr01ubuntu
ping: websvr01ubuntu: Temporary failure in name resolution
rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams16s32-in-x04.1e100.net (2a00:1450:400e:80c::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2042ms


I know 18.04 uses netplan and this is how it the 50-cloud-init.yaml file is configured for static IP address.



network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
addresses: [192.168.0.200/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]




rahim@websrv01ubuntu:~$ ping -c3 google.com
PING google.com(ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e)) 56 data bytes


--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2038ms




rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams15s21-in-x04.1e100.net (2a00:1450:400e:800::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2034ms




rahim@websrv01ubuntu:~$ ping -c3 www.servingyoubetter.co.uk
PING fwd3.hosts.co.uk (85.233.160.22) 56(84) bytes of data.


--- fwd3.hosts.co.uk ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms









share|improve this question

























  • unfortunately my formatting isn't comming through properly for the .yaml file but i have taken into consideration of the 2 space indentation restriction for .yaml files~

    – Rahiim Mawani
    Jan 10 at 15:11
















0















Total newbie here, got fed up with Windows world and gone over to the dark side



Yesterday I installed Ubuntu 18.4 LTS on VirtualBox with bridge connections.



It seems I can ping IP addresses internally, ping with IP addresses externally but when I try to resolve hostnames or websites, I can't.



rahim@websrv01ubuntu:~$ ping -c3 192.168.0.1PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.20 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=9.16 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.38 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 3.206/6.584/9.164/2.497 ms




rahim@websrv01ubuntu:~$ ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=34.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=121 time=27.8 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 22.980/28.526/34.788/4.849 ms
rahim@websrv01ubuntu:~$ ping -c3 websvr01ubuntu
ping: websvr01ubuntu: Temporary failure in name resolution
rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams16s32-in-x04.1e100.net (2a00:1450:400e:80c::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2042ms


I know 18.04 uses netplan and this is how it the 50-cloud-init.yaml file is configured for static IP address.



network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
addresses: [192.168.0.200/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]




rahim@websrv01ubuntu:~$ ping -c3 google.com
PING google.com(ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e)) 56 data bytes


--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2038ms




rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams15s21-in-x04.1e100.net (2a00:1450:400e:800::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2034ms




rahim@websrv01ubuntu:~$ ping -c3 www.servingyoubetter.co.uk
PING fwd3.hosts.co.uk (85.233.160.22) 56(84) bytes of data.


--- fwd3.hosts.co.uk ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms









share|improve this question

























  • unfortunately my formatting isn't comming through properly for the .yaml file but i have taken into consideration of the 2 space indentation restriction for .yaml files~

    – Rahiim Mawani
    Jan 10 at 15:11














0












0








0








Total newbie here, got fed up with Windows world and gone over to the dark side



Yesterday I installed Ubuntu 18.4 LTS on VirtualBox with bridge connections.



It seems I can ping IP addresses internally, ping with IP addresses externally but when I try to resolve hostnames or websites, I can't.



rahim@websrv01ubuntu:~$ ping -c3 192.168.0.1PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.20 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=9.16 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.38 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 3.206/6.584/9.164/2.497 ms




rahim@websrv01ubuntu:~$ ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=34.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=121 time=27.8 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 22.980/28.526/34.788/4.849 ms
rahim@websrv01ubuntu:~$ ping -c3 websvr01ubuntu
ping: websvr01ubuntu: Temporary failure in name resolution
rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams16s32-in-x04.1e100.net (2a00:1450:400e:80c::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2042ms


I know 18.04 uses netplan and this is how it the 50-cloud-init.yaml file is configured for static IP address.



network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
addresses: [192.168.0.200/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]




rahim@websrv01ubuntu:~$ ping -c3 google.com
PING google.com(ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e)) 56 data bytes


--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2038ms




rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams15s21-in-x04.1e100.net (2a00:1450:400e:800::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2034ms




rahim@websrv01ubuntu:~$ ping -c3 www.servingyoubetter.co.uk
PING fwd3.hosts.co.uk (85.233.160.22) 56(84) bytes of data.


--- fwd3.hosts.co.uk ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms









share|improve this question
















Total newbie here, got fed up with Windows world and gone over to the dark side



Yesterday I installed Ubuntu 18.4 LTS on VirtualBox with bridge connections.



It seems I can ping IP addresses internally, ping with IP addresses externally but when I try to resolve hostnames or websites, I can't.



rahim@websrv01ubuntu:~$ ping -c3 192.168.0.1PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.20 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=9.16 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.38 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 3.206/6.584/9.164/2.497 ms




rahim@websrv01ubuntu:~$ ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=34.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=121 time=27.8 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 22.980/28.526/34.788/4.849 ms
rahim@websrv01ubuntu:~$ ping -c3 websvr01ubuntu
ping: websvr01ubuntu: Temporary failure in name resolution
rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams16s32-in-x04.1e100.net (2a00:1450:400e:80c::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2042ms


I know 18.04 uses netplan and this is how it the 50-cloud-init.yaml file is configured for static IP address.



network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
addresses: [192.168.0.200/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]




rahim@websrv01ubuntu:~$ ping -c3 google.com
PING google.com(ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e)) 56 data bytes


--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2038ms




rahim@websrv01ubuntu:~$ ping -c3 www.google.com
PING www.google.com(ams15s21-in-x04.1e100.net (2a00:1450:400e:800::2004)) 56 data bytes


--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2034ms




rahim@websrv01ubuntu:~$ ping -c3 www.servingyoubetter.co.uk
PING fwd3.hosts.co.uk (85.233.160.22) 56(84) bytes of data.


--- fwd3.hosts.co.uk ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms






networking server dns ping






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 10 at 18:24









Zanna

50.6k13135241




50.6k13135241










asked Jan 10 at 15:09









Rahiim MawaniRahiim Mawani

1




1













  • unfortunately my formatting isn't comming through properly for the .yaml file but i have taken into consideration of the 2 space indentation restriction for .yaml files~

    – Rahiim Mawani
    Jan 10 at 15:11



















  • unfortunately my formatting isn't comming through properly for the .yaml file but i have taken into consideration of the 2 space indentation restriction for .yaml files~

    – Rahiim Mawani
    Jan 10 at 15:11

















unfortunately my formatting isn't comming through properly for the .yaml file but i have taken into consideration of the 2 space indentation restriction for .yaml files~

– Rahiim Mawani
Jan 10 at 15:11





unfortunately my formatting isn't comming through properly for the .yaml file but i have taken into consideration of the 2 space indentation restriction for .yaml files~

– Rahiim Mawani
Jan 10 at 15:11










2 Answers
2






active

oldest

votes


















1














It seems that your server is trying to use IPV6 while it might be unproperly configured. You could try disable ipv6 if not used or check your ipv6 configuration.



https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-18-04-bionic-beaver-linux






share|improve this answer































    0














    Check the answer from olivierb2. If still doesn't work, maybe is a problem of /etc/resolv.conf



    user@ubuntu:~$ sudo mv /etc/resolv.conf /etc/resolv.conf.bak
    user@ubuntu:~$ echo nameserver 8.8.8.8 > temp
    user@ubuntu:~$ sudo cp temp /etc/resolv.conf





    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%2f1108607%2fubuntu-18-04-server-unable-to-ping-websites-but-can-ping-ip-addresses%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









      1














      It seems that your server is trying to use IPV6 while it might be unproperly configured. You could try disable ipv6 if not used or check your ipv6 configuration.



      https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-18-04-bionic-beaver-linux






      share|improve this answer




























        1














        It seems that your server is trying to use IPV6 while it might be unproperly configured. You could try disable ipv6 if not used or check your ipv6 configuration.



        https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-18-04-bionic-beaver-linux






        share|improve this answer


























          1












          1








          1







          It seems that your server is trying to use IPV6 while it might be unproperly configured. You could try disable ipv6 if not used or check your ipv6 configuration.



          https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-18-04-bionic-beaver-linux






          share|improve this answer













          It seems that your server is trying to use IPV6 while it might be unproperly configured. You could try disable ipv6 if not used or check your ipv6 configuration.



          https://linuxconfig.org/how-to-disable-ipv6-address-on-ubuntu-18-04-bionic-beaver-linux







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 10 at 15:43









          olivierb2olivierb2

          1,87989




          1,87989

























              0














              Check the answer from olivierb2. If still doesn't work, maybe is a problem of /etc/resolv.conf



              user@ubuntu:~$ sudo mv /etc/resolv.conf /etc/resolv.conf.bak
              user@ubuntu:~$ echo nameserver 8.8.8.8 > temp
              user@ubuntu:~$ sudo cp temp /etc/resolv.conf





              share|improve this answer




























                0














                Check the answer from olivierb2. If still doesn't work, maybe is a problem of /etc/resolv.conf



                user@ubuntu:~$ sudo mv /etc/resolv.conf /etc/resolv.conf.bak
                user@ubuntu:~$ echo nameserver 8.8.8.8 > temp
                user@ubuntu:~$ sudo cp temp /etc/resolv.conf





                share|improve this answer


























                  0












                  0








                  0







                  Check the answer from olivierb2. If still doesn't work, maybe is a problem of /etc/resolv.conf



                  user@ubuntu:~$ sudo mv /etc/resolv.conf /etc/resolv.conf.bak
                  user@ubuntu:~$ echo nameserver 8.8.8.8 > temp
                  user@ubuntu:~$ sudo cp temp /etc/resolv.conf





                  share|improve this answer













                  Check the answer from olivierb2. If still doesn't work, maybe is a problem of /etc/resolv.conf



                  user@ubuntu:~$ sudo mv /etc/resolv.conf /etc/resolv.conf.bak
                  user@ubuntu:~$ echo nameserver 8.8.8.8 > temp
                  user@ubuntu:~$ sudo cp temp /etc/resolv.conf






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 10 at 22:16









                  James SJames S

                  413




                  413






























                      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%2f1108607%2fubuntu-18-04-server-unable-to-ping-websites-but-can-ping-ip-addresses%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

                      Human spaceflight

                      Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                      File:DeusFollowingSea.jpg