0

I suddenly couldn't wget a file after having gotten one 5 mins before.

I can no longer "ping google.com"

I can "ping 1.1.1.1"

/etc/resolv.conf:

#Generated by resolvconf
nameserver 1.1.1.1
nameserver 8.8.8.8

ifconfig for eth0(which is what I am using):

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.0.142  netmask 255.255.255.0  broadcast 192.168.0.255
    inet6 fe80::15b5:7a2e:8121:e45e  prefixlen 64  scopeid 0x20<link>
    ether dc:a6:32:43:a3:9b  txqueuelen 1000  (Ethernet)
    RX packets 11804  bytes 1565414 (1.4 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 2577  bytes 301865 (294.7 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Output from route -n

Kernel IP routing table
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
 0.0.0.0         192.168.0.1     0.0.0.0         UG    202    0        0 eth0
 10.6.0.0        0.0.0.0         255.255.255.0   U     0      0        0 wg0
 192.168.0.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0

Result from traceroute 1.1.1.1

traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets
1  192.168.0.1 (192.168.0.1)  0.420 ms  0.398 ms  0.369 ms
2  10.200.211.1 (10.200.211.1)  2.708 ms  2.540 ms  2.494 ms
3  192.38.10.89 (192.38.10.89)  21.809 ms  21.779 ms  21.640 ms
4  130.225.245.13 (130.225.245.13)  8.338 ms  8.277 ms  11.434 ms
5  109.105.102.160 (109.105.102.160)  9.342 ms  9.145 ms  9.119 ms
6  109.105.97.117 (109.105.97.117)  8.959 ms  9.468 ms  9.970 ms
7  212.237.193.246 (212.237.193.246)  10.997 ms 212.237.192.246 (212.237.192.246)  11.016 ms 10.305 ms
8  1.1.1.1 (1.1.1.1)  10.643 ms  10.550 ms  9.560 ms
  • Sounds as an intermittent error? – MatsK Aug 11 '21 at 19:52
  • @MatsK Doubt it, all other devices on the network works fine and I am consistentently getting this problem on my PI, haven't had it working once since the first error – Thomas Nykjær Aug 11 '21 at 19:59
  • 2
    Your question appears to have nothing to do with Raspberry Pi, per se, but with your network configuration. Why have you set 1.1.1.1 as your primary DNS? It looks like an odd choice. – Seamus Aug 11 '21 at 20:06
  • 1
    @Seamus Maybe not per se, but if I need to change some configuration file I don't know I would need a pointer. 1.1.1.1 is faster than 8.8.8.8. I have also tested it with 8.8.8.8 as primary dns – Thomas Nykjær Aug 11 '21 at 20:11
  • Ah! I see now that 1.1.1.1 is the "cloudFare" DNS. Turning to your route -n output, what is wg0? 2nd Q: Have you made any changes to your /etc/dhcpcd.conf file – Seamus Aug 11 '21 at 20:32
  • @Seamus Yeah, cloudflare.... i totally knew it was cloudflare and not a new company by it self. About wg0... i actually don't know. A quick search online says it's wireguard vpn(a virtual apdapter i assume). I don't know if wireguard is installed. I will report back in a bit – Thomas Nykjær Aug 11 '21 at 21:44
  • @Seamus Wireguard uninstalled and the output of 'route -n': Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 202 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0 – Thomas Nykjær Aug 11 '21 at 22:22
  • OK - it's always good troubleshooting to eliminate variables. You may want to edit your question to reflect this new information. Other than that - have you made any changes to your /etc/dhcpcd.conf file? – Seamus Aug 12 '21 at 01:57
  • I have, a bit. I can't post it here though, should I try commenting everything out so it is effectively empty? Or rename it temporarily? – Thomas Nykjær Aug 12 '21 at 15:33
  • @ThomasNykjær: Two things: 1) Comments to others under a question (or answer) you have authored must mention the user handle (@whatever) for them to get a notification. 2) You should consider using systemd-networkd instead of dhcpcd to control your network config - due to your non-standard setup. A good how-to is here. – Seamus Aug 13 '21 at 17:37

1 Answers1

0

The error was at least partially due to a wrong configuration file. The file: /etc/nsswitch.conf mdns4 needed to be changed to dns