1

I bought a new MacBook Pro 2021 M1, and I can't access URLs ending with .io, .xyz, and other less popular TLDs. The issue does not come from the browser. I tried many browsers and the terminal commands ping and curl.

The error message I'm getting depends on which program I'm using to call the URLs. But basically, this is the message I'm getting: "Could not resolve host".

The URLs are all valid because I can open them from my phone, which is connected to the same WiFi network as my MacBook.

I'm sure the problem concerns the firewall (or DNS?). What can I do to fix this problem?

Edit: I used the following command:

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

It worked for a day and now it stopped working again. I didn't change any DNS or Firewall settings in the meantime.

  • 1
    Which DNS server is defined in Network settings? Try changing it to 8.8.8.8 or 1.1.1.1. – nohillside Jun 15 '23 at 10:31
  • I already did. I also tried 8.8.4.4. But it didn't change anything :/ – BonisTech Jun 15 '23 at 10:34
  • Any network-related software running on the Mac? – nohillside Jun 15 '23 at 11:10
  • NordLayer VPN. But it's off at the moment. I deleted it now, but nothing changed. The problem was there already before I downloaded it. – BonisTech Jun 15 '23 at 11:26
  • 1
    Let’s see what your DNS server is responding with when you query it. Issue the command host foobar.xyz and to see what Google’s DNS replies with use host foobar.xyz 8.8.8.8. This will determine if the DNS server itself is correctly resolving the address. – Allan Jun 15 '23 at 13:48
  • The first command is returns: foobar.xyz has address 34.102.136.180 foobar.xyz mail is handled by 0 smtp.secureserver.net. foobar.xyz mail is handled by 10 mailstore1.secureserver.net.. The second command returns: `Name: 8.8.8.8 Address: 8.8.8.8#53 Aliases:

    foobar.xyz has address 34.102.136.180 foobar.xyz mail is handled by 10 mailstore1.secureserver.net. foobar.xyz mail is handled by 0 smtp.secureserver.net.`

    – BonisTech Jun 16 '23 at 06:39
  • Need to know more about the full state of your network stack in addition to your DNS settings. For example: any VPN software running in the background (even if not active); use of Apple's IP address hiding; browser extensions; malware protection. – Gilby Jun 19 '23 at 22:38
  • Using Terminal, try pining the address directly. Also run a trace: traceroute 34.102.136.180 – Allan Jun 20 '23 at 03:59
  • @Gilby what exactly do you need to know? I don't think the issue comes from my network. I'm able to connect to the same domains from different machines. I also tried switching networks and it's still not working. I have NordLayer VPN installed on my MacBook. I don't have any further malware protection installed. – BonisTech Jun 21 '23 at 18:44
  • @Allan what exactly is this IP address? And what should I expect it to return? – BonisTech Jun 21 '23 at 18:47
  • 1
    That’s the address of the host you looked up. You provided it in comments – Allan Jun 21 '23 at 18:48
  • Silly me, you're right. Here's the result: traceroute to 34.102.136.180 (34.102.136.180), 64 hops max, 52 byte packets 1 kabelbox (MY_IP) 6.684 ms 3.323 ms 3.333 ms 2 * * * 3 ip5886c96d.static.kabel-deutschland.de (88.134.201.109) 18.467 ms 14.765 ms ip5886cb75.static.kabel-deutschland.de (88.134.203.117) 16.077 ms 4 145.254.3.170 (145.254.3.170) 16.226 ms 145.254.3.168 (145.254.3.168) 17.556 ms 18.070 ms …the list goes on 9 180.136.102.34.bc.googleusercontent.com (34.102.136.180) 12.444 ms 15.216 ms 13.509 ms. It doesn't seem to throw an error – BonisTech Jun 21 '23 at 18:56
  • Reaching the IP is not the issue here, it's DNS. You said it also doesn't work from the terminal, but we can see here that it does. Does ping foobar.xyz work? – gshpychka Jun 22 '23 at 08:18

1 Answers1

0

Solved

I ran scutil --dns to find this:

resolver #9
  domain   : xyz
  nameserver[0] : 127.0.0.1
  flags    : Request A records, Request AAAA records
  reach    : 0x00030002 (Reachable,Local Address,Directly Reachable Address)

resolver #10 domain : io nameserver[0] : 127.0.0.1 flags : Request A records, Request AAAA records reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address)

Turns out there were two xyz and io files in /etc/resolver. I don't know why they were there. My MacBook is new and I imported a backup from my old MacBook. I just checked my old MacBook and the etc/resolver folder had only a test file.

Special thanks to @llude for his enlightening answer.