Score:0

Terminal has network (DNS?) issues but browser works fine. ipv6 issue?

sc flag

EDIT: It seems it might be a cable modem issue: according to https://test-ipv6.com/ ipv6 is not working both in Ubuntu as well as windows (dual boot, same workstation), and neither on my smartphone when on wifi (i.e. same cable modem), while it does work on smartphone with wifi disabled (i.e. mobile data). So I will contact my ISP.

I have a fresh Ubuntu 22.04 install on a desktop PC with a wired internet connection. It has the default networking configuration settings (DHCP; IP address from cable modem).

Internet access works fine from a browser.

From the command line however, some programs (e.g. apt update or apt upgrade) seem to work fine, though maybe somewhat slow (?), while others fail, e.g. wget:

~$ wget https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
--2023-05-17 13:56:57--  https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8002::154, 2606:50c0:8001::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... failed: Connection timed out.
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... ^C

Accessing the same link from a webbrowser instantly loads the ros2.repos file.

Adding an entry "185.199.108.133 raw.githubusercontent.com" to /etc/hosts also solves the issue:

$ wget https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
--2023-05-17 14:52:18--  https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12144 (12K) [text/plain]
Saving to: ‘ros2.repos.1’

ros2.repos.1                                     100%[=======================================================================================================>]  11,86K  --.-KB/s    in 0s      

2023-05-17 14:52:18 (124 MB/s) - ‘ros2.repos.1’ saved [12144/12144]

So I think it is an ipv4 vs ipv6 issue. Though I have no idea why it works from the browser but not from the terminal.

Any suggestions on how to debug this?

uz flag
Jos
Must be an IPv6 issue. I only get to see IPv4 addresses for that server.
JRTG avatar
sc flag
@Jos It is not just that server, that's just an example. E.g. `ping www.google.com PING www.google.com(ams15s41-in-x04.1e100.net (2a00:1450:400e:802::2004)) 56 data bytes` does not work either, whereas ipv4 ping does work: `ping -4 www.google.com PING (142.250.179.164) 56(84) bytes of data. 64 bytes from ams15s41-in-f4.1e100.net (142.250.179.164): icmp_seq=1 ttl=58 time=30.7 ms`
Terrance avatar
id flag
Ignore my last comment. You are having an IPv6 DNS issue. I'll get back to ya about what to possibly check. But, have you checked if your IPv6 is working in a web browser? https://test-ipv6.com/
Score:0
ng flag

Apparently wget may have issues with IPv6 addresses occasionally. There is an option that can be set so that it always uses IPv4 addresses only:

Adding inet4_only = on to /etc/wgetrc should resolve this.

Credits to wget and ipv6 problem?

JRTG avatar
sc flag
It is not a specific problem with `wget`, e.g. ping isn't working either for ipv6 addresses.
Janne Jokitalo avatar
ng flag
Okay, can you post the output of `ip a`? There is the option of disabling IPv6 altogether, if it acts erroneously. https://itsfoss.com/disable-ipv6-ubuntu-linux/
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.