Score:1

I connect to the router but cannot connect to the internet Ubuntu 20.04

lb flag

I am having an issue with connecting to internet over my home network. I can definitely connect to the router, I can send ping to the router address, I can even see that my laptop is connected to the router from the interface of the router. I can't get to the router interface via my laptop tho. I get 404 not found error when I try this with my laptop but I can do this with my mobile phone.

I am currently connected to my mobile phone's hotspot. That's the only way I can connect to the internet. I also can't connect to internet using Ethernet cable either.

Things I have tried so far:

I updated the network adapter driver (rtl8821ce)

I checked the journalctl outputs using journalctl -u NetworkManager.service -f command. Here is the recent output of it when I try to connect to my home network

Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0318] dhcp4 (wlo1): state changed unknown -> bound
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0359] device (wlo1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0430] device (wlo1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0435] device (wlo1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0442] manager: NetworkManager state is now CONNECTED_LOCAL
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0459] manager: NetworkManager state is now CONNECTED_SITE
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0460] policy: set 'FiberHGW_ZT5S2F_5GHz' (wlo1) as default for IPv4 routing and DNS
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0472] device (wlo1): Activation: successful, device activated.
Mar 30 01:28:41 mete-HP-Pavilion-Laptop-14-ce3xxx NetworkManager[975]: <info>  [1680128921.0478] manager: NetworkManager state is now CONNECTED_GLOBAL

Checked dmesg output to see if I can notice an error. The recent output was this:

[ 1534.788017] rtw_8821ce 0000:0b:00.0: sta ce:a7:7a:44:0c:6c with macid 0 left
[ 1539.477710] wlo1: authenticate with ce:a7:7a:44:0c:6c
[ 1540.136524] wlo1: send auth to ce:a7:7a:44:0c:6c (try 1/3)
[ 1540.141082] wlo1: authenticated
[ 1540.144419] wlo1: associate with ce:a7:7a:44:0c:6c (try 1/3)
[ 1540.150071] wlo1: RX AssocResp from ce:a7:7a:44:0c:6c (capab=0x411 status=0 aid=1)
[ 1540.150105] rtw_8821ce 0000:0b:00.0: sta ce:a7:7a:44:0c:6c joined with macid 0
[ 1540.150347] wlo1: associated

Checked my firewall using sudo ufw status and the output was Status: inactive

Tried to change the DNS setting using both Wifi settings on GUI and setting nameserver value as 8.8.8.8 on /etc/resolv.conf/

Checked the nmcli device output and it gave me this:

wlo1             wifi      connected    FiberHGW_ZT5S2F_5GHz              
br-07d2482755db  bridge    connected    br-07d2482755db 
br-422e1e73cb6d  bridge    connected    br-422e1e73cb6d 
br-b281592c535c  bridge    connected    br-b281592c535c 
docker0          bridge    connected    docker0         
virbr0           bridge    connected    virbr0          
eno1             ethernet  unavailable  --              
lo               loopback  unmanaged    --              
virbr0-nic       tun       unmanaged    -- 

Checked static IP conflicts using sudo arp-scan -l command. There is no conflict

Removed network configurations using sudo rm /etc/NetworkManager/system-connections/* command

Despite all, I couldn't figure out what the problem is and why I can connect and use internet with no problem with my mobile hotspot but I can't connect to other routers (I tried it with an another modem that works with SIM Card just like a hotspot too. It didn't connect anyway despite I could also connect to that device with my phone).

I am open to any suggestions. Thank you a lot.

Will avatar
id flag
Really obvious thing to check - turn your phone’s mobile data off (so it can’t use its sim) - can it connect to your router and access the internet? At least that will exclude a router problem if you can get online.
Mete avatar
lb flag
Yes, I just tried it and my phone can connect to the internet without mobile data
ru flag
What are the IP ranges of your Docker bridges and your other bridges? If *any* of them conflict with your current IP range you're on or the DNS servers or routes to the gateway OR the router interface, you've got a broken network configuration on your system. (I ran into this myself with my `docker0` bridge creating a `172.17` range IP that conflicted hard with my own network and i had to make changes to my config for Docker to use different ranges) Include the output of `sudo ip -4 route list` and the private IP range of your wifi/ethernet network.
Mete avatar
lb flag
Yes! You are right. One of the docker images was conflicting with my ip address range on my home network. I am writing down what I have done so other people that might have the same problem can solve the issue.
Mete avatar
lb flag
Thank you so much Thomas!
Score:1
lb flag

I resolved the issue thanks to Thomas Ward's comment. Here is step by step guide:

First, checked the Docker bridges using sudo docker network ls

Then, I checked my current IP range and DNS servers using ip addr show. And also checked ip v4 routes by using ip -4 route list (or you can use ip route show).

To see the ip range of the docker networks, I used sudo docker network inspect <network_name> | grep Subnet command. One of them was starting with 192 despite others were fine. For example bridge network subnet is "172.17.0.0/16", tut_default network subnet is "172.19.0.0/16", mynet network subnet is 192.168.1.0/24

192.168.1.0/24 is also my home network's ip range. The output of ip route show is this:

default via 192.168.1.1 dev wlo1 proto dhcp metric 600 
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-422e1e73cb6d proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-07d2482755db proto kernel scope link src 172.19.0.1 linkdown 
192.168.1.0/24 dev wlo1 proto kernel scope link src 192.168.1.33 metric 600 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown

wlo1 is the wifi network interface of Ubuntu. So, I was using wlo1 interface which has 192.168.1.0/24 CIDR notation.

Therefore, I deleted the mynet network using sudo docker network rm mynet command. If you want to use your docker network anyway, you can reinstall the network by also mentioning the ip address range. For example, I could type sudo docker network create --subnet=172.25.0.0/16 mynet for the mynet after I deleted it using sudo docker rm mynetcommand.

I hope it helps!

I sit in a Tesla and translated this thread with Ai:

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.