You are not logged in.

#1 2023-01-06 08:34:19

sainishwanth
Member
Registered: 2022-11-19
Posts: 17

[Solved] Cannot ping any websites. Resolver issue.

This has been an issue since I first set up my arch machine couple months ago but I didn't really bother me until late.

I cannot ping any websites using their names, i.e - google.com, archlinux.org, etc.

I can however ping ip address and dns's like 8.8.8.8, etc without any issue.

~  ping google.com
PING google.com(bom12s18-in-x0e.1e100.net (2404:6800:4009:82b::200e)) 56 data bytes
From 2401:4900:1cc5:e33:bac1:acff:fe9a:4515 (2401:4900:1cc5:e33:bac1:acff:fe9a:4515) icmp_seq=1 Destination unreachable: Address unreachable
From 2401:4900:1cc5:e33:bac1:acff:fe9a:4515 (2401:4900:1cc5:e33:bac1:acff:fe9a:4515) icmp_seq=2 Destination unreachable: Address unreachable
From 2401:4900:1cc5:e33:bac1:acff:fe9a:4515 (2401:4900:1cc5:e33:bac1:acff:fe9a:4515) icmp_seq=3 Destination unreachable: Address unreachable
From 2401:4900:1cc5:e33:bac1:acff:fe9a:4515 (2401:4900:1cc5:e33:bac1:acff:fe9a:4515) icmp_seq=4 Destination unreachable: Address unreachable
From 2401:4900:1cc5:e33:bac1:acff:fe9a:4515 (2401:4900:1cc5:e33:bac1:acff:fe9a:4515) icmp_seq=5 Destination unreachable: Address unreachable
^C
--- google.com ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4006ms

This has become an issue since npm cannot connect to it's repositories and download any packages.

Any help is appreciated. Thanks in advance.

npm install pyright
npm ERR! code EHOSTUNREACH
npm ERR! syscall connect
npm ERR! errno EHOSTUNREACH
npm ERR! request to https://registry.npmjs.org/pyright failed, reason: connect EHOSTUNREACH 2606:4700:9763:80e2:e476:6:6810:1023:443

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sainishwanth/.npm/_logs/2023-01-06T08_30_44_421Z-debug-0.log

I have found only one or two issues related to this on npm's github and the devs blamed said it was the user's firewall causing this issue and not with npm.


I have systemd-networkd and systemd-resolved enabled,
also here is my /etc/hosts if it matters.

# Static table lookup for hostnames.
# See hosts(5) for details.

127.0.0.1   localhost
::1     localhost
127.0.0.1   sainishwanth

Last edited by sainishwanth (2023-01-06 10:53:28)

Offline

#2 2023-01-06 09:49:45

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] Cannot ping any websites. Resolver issue.

That's a resolver issue, what makes you believe that it's FW related??
Did you configure one and does it block port 53?

resolvectl status
cat /etc/resolv.conf
stat /etc/resolv.conf
dig google.com
dig @8.8.8.8 google.com

Offline

#3 2023-01-06 10:28:28

sainishwanth
Member
Registered: 2022-11-19
Posts: 17

Re: [Solved] Cannot ping any websites. Resolver issue.

seth wrote:

That's a resolver issue, what makes you believe that it's FW related??
Did you configure one and does it block port 53?

Hey, Seth! Sry, I had just assumed it was related to a firewall issue after reading some similar threads online. I wasn't really sure. I'll edit the question.

I did setup iptables since I assumed that was causing the issue but it persisted even after that, and I do belive port 53 is not blocked

cat /etc/services | grep -i "5353"
mdns             5353/tcp
mdns             5353/udp

I ran commands you had mentioned.

resolvectl status

~  resolvectl status
Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: foreign
  Current DNS Server: 192.168.1.1
         DNS Servers: 192.168.1.1
Fallback DNS Servers: 1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net 8.8.8.8#dns.google
                      2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net
                      2001:4860:4860::8888#dns.google
          DNS Domain: domain.name

Link 2 (enp5s0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.1
       DNS Servers: 192.168.1.1 fe80::bac1:acff:fe9a:4515
        DNS Domain: domain.name

Link 3 (wlan0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

cat /etc/resolv.conf

~ cat /etc/resolv.conf
# Generated by NetworkManager
search domain.name
nameserver 192.168.1.1
nameserver fe80::bac1:acff:fe9a:4515%enp5s0

stat /etc/resolv.conf

~  stat /etc/resolv.conf
  File: /etc/resolv.conf
  Size: 116       	Blocks: 8          IO Block: 4096   regular file
Device: 259,3	Inode: 27395310    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-01-06 15:48:27.590498852 +0530
Modify: 2023-01-06 15:48:27.533498849 +0530
Change: 2023-01-06 15:48:27.539498849 +0530
 Birth: 2023-01-06 15:48:27.533498849 +0530

dig google.com

~  dig google.com

; <<>> DiG 9.18.10 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7148
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		25	IN	A	216.58.200.142

;; Query time: 7 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Fri Jan 06 15:56:01 IST 2023
;; MSG SIZE  rcvd: 55

dig @8.8.8.8 google.com

~  dig @8.8.8.8 google.com

; <<>> DiG 9.18.10 <<>> @8.8.8.8 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 316
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		275	IN	A	142.250.182.110

;; Query time: 14 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Fri Jan 06 15:56:27 IST 2023
;; MSG SIZE  rcvd: 55

Last edited by sainishwanth (2023-01-06 10:29:44)

Offline

#4 2023-01-06 10:43:26

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] Cannot ping any websites. Resolver issue.

resolv.conf is controlled by NM, your default DNS is 192.168.1.1 (you router, I guess) and you can resolve IPs from there (at least googles)
The system however seems to default to IPv6 and your provider might not support that.
https://wiki.archlinux.org/title/IPv6#Disable_IPv6
https://wiki.archlinux.org/title/IPv6#P … _over_IPv6

Offline

#5 2023-01-06 10:53:05

sainishwanth
Member
Registered: 2022-11-19
Posts: 17

Re: [Solved] Cannot ping any websites. Resolver issue.

seth wrote:

resolv.conf is controlled by NM, your default DNS is 192.168.1.1 (you router, I guess) and you can resolve IPs from there (at least googles)
The system however seems to default to IPv6 and your provider might not support that.
https://wiki.archlinux.org/title/IPv6#Disable_IPv6
https://wiki.archlinux.org/title/IPv6#P … _over_IPv6

Disabling IPv6 fixed the issue for me, I can download npm packages finally!

Thanks, a lot seth! Really appreciate it!

Offline

Board footer

Powered by FluxBB