Score:2

Network connected but can only access some sites

cn flag

I am using Ubuntu 22.04. I recently moved to a new place with a different wifi. When I connect to the wifi on other devices running Windowns/android/iPodOS everything works well. But on my ubuntu I am unable to access many (most) sites. I can access google affiliated sites and use google search, as well as some other websites. But e.g. stackexchange websites are unreachable on firefox. I simply get a 'Server not found' error. The same happens when I try to ping these sites with ping www.twitter.com.

While connected to the home netowork, I ran ip route list and got no output. On the other hand when I run ip -6 route list I get some output including a default route. When I use my phone's hotspot instead, everything works well and I also get an output including a default route with ip route list. So I'm guessing this is somehow the problem.

I have tried the solution from here and here but nothing changed.

cyberbrain avatar
cn flag
Does this answer your question? [Ubuntu VM with no IPv4 connection, only IPv6](https://askubuntu.com/questions/1109945/ubuntu-vm-with-no-ipv4-connection-only-ipv6)
cyberbrain avatar
cn flag
looks as if you only got an IPv6 address but no IPv4 address. Usually this should work fine, can you try to ping a "well known" IPv4 address like 8.8.8.8? Maybe just name resolution has to be fixed...
Enforce avatar
cn flag
I don't think so. I'm not sure I understand what is going on in that question.
Enforce avatar
cn flag
when I try to ping that address I get ```ping: connect: Network is unreachable```. However, I can ping ```www.google.com``` just fine.
Spaceship Operations avatar
cn flag
Well, let's try to reduce the problem for now. Try running `ping 1.1.1.1`. If it doesn't work, then you're unable to connect to IPv4 IP addresses altogether. If it does work, then you can use IPv4, so the problem would be most likely in DNS resolution. In case it's the latter, try editing `/etc/resolv.conf` and replacing all its contents with just `nameserver 1.1.1.1` (This is CloudFlare's public DNS), then `ping` some domain like `wikipedia.org` and see if that works.
Enforce avatar
cn flag
pinging 1.1.1.1 does not work... are there any workarounds?
Esther avatar
es flag
https://askubuntu.com/questions/1025008/ipv6-is-working-but-ipv4-isnt
Thomas Aichinger avatar
cn flag
can you post output of "ip a" and content of network config file in /etc/netplan/. Replace last numbers of ip address with xx.
mpboden avatar
do flag
Have you tried connecting your computer to the router directly with a cable? Does that allow access to all sites? What router are you using? Could an old DHCP lease be in effect from the previous network that is somehow confusing the connection and/or providing incorrect DNS servers?
mpboden avatar
do flag
Please update your question with the output of each of the following commands: `ip a`, `ip route`, `resolvectl`, `cat /etc/netplan/*`, `systemctl status systemd-resolved`, `ls -l /etc/resolv.conf`
Enforce avatar
cn flag
I will update the question once I have access to that computer again. Currently I am away from home.
Score:0
zw flag

Click activities and search for "network". Select the "Advanced network" icon. Select your connection and go to the "IPV4" tab:

1

The method Automatic(DHCP) should be selected by default. If not change it. This is the place where you could add additional DNS servers (like 8.8.8.8) into the corresponding entry fields.

Score:-1
us flag

Change the IPv4 DNS to Google Public DNS, Search Google Public DNS in google. check

https://developers.google.com/speed/public-dns/docs/using#linux

Esther avatar
es flag
OP says they can't even ping 8.8.8.8, this will not solve the problem if the computer can't connect to any ipv4 addresses.
Biswajit Bimoli avatar
us flag
please check network setting, you might have disabled ipv4. Go to wifi settings, Click on the settings icon of your wifi network, Go to IPV4 tab and change IPV4 method from disable to automatic
kanehekili avatar
zw flag
This does not solve the problem. IPV4 seems not to be activated. (which is strange - I always had to disable IPV6, but never **enable** ipv4)
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.