Score:1

Ethernet connected but no internet connection in Ubuntu 20.04

br flag

I have an ethernet connection. But I am getting no internet. I cannot visit any website or anything related to internet.

Here are some commands that I ran:

$ ping google.com
ping: google.com: Temporary failure in name resolution
$ sudo lshw -C network
  *-network
       description: Ethernet interface
       product: RTL810xE PCI Express Fast Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 07
       serial: 10:7b:44:32:b5:91
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.11.0-41-generic firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:16 ioport:e000(size=256) memory:ef000000-ef000fff memory:e0000000-e0003fff
  *-network:0
       description: Ethernet interface
       physical id: 1
       logical name: ipv6leakintrf0
       serial: 86:d4:7a:5b:33:1b
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=5.11.0-41-generic
  *-network:1
       description: Wireless interface
       physical id: 2
       bus info: usb@1:1
       logical name: wlx7cc2c61b3890
       serial: 7c:c2:c6:1b:38:90
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=r8188eu driverversion=5.11.0-41-generic ip=192.168.31.85 multicast=yes wireless=IEEE 802.11bgn
$ ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.31.236  netmask 255.255.255.0  broadcast 192.168.31.255
        inet6 fe80::37e2:dfce:fe9a:3b87  prefixlen 64  scopeid 0x20<link>
        ether 10:7b:44:32:b5:91  txqueuelen 1000  (Ethernet)
        RX packets 4611  bytes 278152 (278.1 KB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 126  bytes 16768 (16.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ipv6leakintrf0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet6 fdeb:446c:912d:8da::  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::e70e:7372:7fc3:14a7  prefixlen 64  scopeid 0x20<link>
        ether 72:39:c1:33:e1:52  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10953  bytes 1136027 (1.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 31412  bytes 2334819 (2.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 31412  bytes 2334819 (2.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ 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=58 time=294 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=113 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=58 time=137 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 113.372/181.329/293.792/80.097 ms
$ ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Jul 14 00:58 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
$ ping -c3 www.google.com
ping: www.google.com: Temporary failure in name resolution
$ resolvectl status
Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 4 (ipv6leakintrf0)
      Current Scopes: DNS
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: ::1
         DNS Servers: ::1
          DNS Domain: ~.

Link 3 (wlx7cc2c61b3890)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (enp2s0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
lines 31-60
                      lan
                      local
                      private
                      test

Link 4 (ipv6leakintrf0)
      Current Scopes: DNS
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: ::1
         DNS Servers: ::1
          DNS Domain: ~.

Link 3 (wlx7cc2c61b3890)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (enp2s0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
$ sudo service systemd-resolved status | grep Active
     Active: active (running) since Tue 2021-12-14 00:35:01 +06; 21h ago

enter image description here

What can I do? I have already tried mobile tethering and wifi is also connected. But that's also not working.

Update: The issue has been resolved once I uninstalled protonVPN. Just follow the instructions provided in the official protonVPN website to uninstall it and then follow the instruction in here.

chili555 avatar
cn flag
Please edit your question to show the result of the terminal commands: `ping -c3 8.8.8.8` and: `ls -al /etc/resolv.conf` Thanks!
Merajul Arefin Pial avatar
br flag
I have added the output for the commands that you asked for.
Brijesh Sondarva avatar
ve flag
Hi, can you please open Firefox and type the "google.com" and send the screenshot of whats the error you should find for that.
Merajul Arefin Pial avatar
br flag
I have added a screenshot.
chili555 avatar
cn flag
Nothing wrong and therefore fixable yet. What is the result of: `cat /etc/resolv.conf` and: `ping -c3 www.google.com`
Merajul Arefin Pial avatar
br flag
Added those outputs
chili555 avatar
cn flag
Now let's see: `resolvectl status` and: `sudo service systemd-resolved status | grep Active` Very interesting issue here. Are you using a VPN?
Merajul Arefin Pial avatar
br flag
I am not connected to any VPN right now but I installed protonVPN 2 days before. But its not active right now. I added the outputs that you asked for.
Bovine avatar
ru flag
Is dns listed in `grep -i hosts /etc/nsswitch.conf`?
Merajul Arefin Pial avatar
br flag
@Bovine I don't know what you meant but this is the output of your command: `hosts: files mdns4_minimal [NOTFOUND=return] dns`
Merajul Arefin Pial avatar
br flag
Thank you, my internet is working again. I am never using protonvpn again.
chili555 avatar
cn flag
Yours is not the first or last question here that is the result of *removing* a VPN after the VPN has hijacked the DNS nameserver mechanism. It would be helpful for the searchers if you outlined the exact method you used to restore DNS in the form of an answer to your question. You may then accept the answer and I will upvote it. Thanks.
Merajul Arefin Pial avatar
br flag
I added the answer to my issue at the end of my post. I already closed my question so I can't answer it now.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.