Skip to content

[Bug]: default DNS doesn't work on macOS 26.0 Beta (25A5327h) #480

Closed

Description

@seven1240

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

installed release 0.3.0
upgrade from macOS 15 to macOS 26 Beta

$ container run --rm --name blah alpine ping apple.com
ping: bad address 'apple.com'

$ container run --dns 8.8.8.8 --rm --name blah alpine ping apple.com
PING apple.com (17.253.144.10): 56 data bytes
64 bytes from 17.253.144.10: seq=0 ttl=55 time=5.519 ms

uninstall with -d and reinstall, problem remains the same.

Current behavior

$ container run --rm --name blah alpine ping apple.com
ping: bad address 'apple.com'

$ container run --rm --name blah alpine cat /etc/resolv.conf
nameserver 192.168.64.1

$ container run --rm --name blah alpine ifconfig
eth0      Link encap:Ethernet  HWaddr 0A:A2:84:87:BF:62
          inet addr:192.168.64.18  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::8a2:84ff:fe87:bf62/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1280  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:282 (282.0 B)  TX bytes:90 (90.0 B)

Expected behavior

ping works

Environment

- OS: Darwin seven-3.local 25.0.0 Darwin Kernel Version 25.0.0: Fri Jul 25 23:17:53 PDT 2025; root:xnu-12377.0.187.0.2~21/RELEASE_ARM64_T6000 arm64
- Xcode: N/A
- Container: container CLI version 0.3.0 (build: release, commit: 3fcf647)

Relevant log output

$ container system dns default inspect

$ container run --rm --name blah alpine ping blah.container
ping: bad address 'blah.container'

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Aug 10, 2025
  2. jglogan commented on Aug 10, 2025

    @jglogan
    Contributor

    @seven1240 I just installed 0.3.0 from the release page and gave it a go, and I see your expected results.

    % container system start
    Verifying apiserver is running...
    /Users/john/Documents/projects/vessel/container-internal main % container run --rm --name blah alpine ping apple.com
    PING apple.com (17.253.144.10): 56 data bytes                                           
    64 bytes from 17.253.144.10: seq=0 ttl=57 time=13.707 ms
    64 bytes from 17.253.144.10: seq=1 ttl=57 time=12.724 ms
    64 bytes from 17.253.144.10: seq=2 ttl=57 time=12.907 ms
    ^C
    --- apple.com ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 12.724/13.112/13.707 ms

    Thanks for providing the differential case that works. Could you try a test with two terminals where you start an alpine shell in the first?

    container run -it --rm --name blah alpine sh

    And then with that container running, try this in the second?

    lsof -i :53

    Expected for that would be something like:

    % sudo lsof -i :53
    Password:
    COMMAND   PID           USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
    mDNSRespo 433 _mdnsresponder   36u  IPv4 0x978b4f76b4c23f11      0t0  UDP *:domain
    mDNSRespo 433 _mdnsresponder   37u  IPv6 0x9d120e24791ab9df      0t0  UDP *:domain
    mDNSRespo 433 _mdnsresponder   47u  IPv4 0x3b4c592c9ba94999      0t0  TCP *:domain (LISTEN)
    mDNSRespo 433 _mdnsresponder   49u  IPv6 0x4e33f66301bb87ec      0t0  TCP *:domain (LISTEN)

    With no containers running those listeners should go away.

    If you don't see those mDNSResponder on 53 with your container running, that's your proximal cause. Root cause is whatever's causing that to happen. There's an issue open relating to running other DNS servers on your host – that can be due to explicit action (the issue in question relates to wanting to put dnsmasq there), or using say a VPN (Cloudflare WARP) that want to post up on port 53.

  3. seven1240 commented on Aug 10, 2025

    @seven1240
    Author

    @jglogan Thank you for quick response. Both with and without container run -it --rm --name blah alpine sh, lsof -i :53 returns nothing. I don't use a VPN. Not sure how to debug this.

    Also I tried local dns which is not working too I guess it's the same problem:

    $ container system dns default inspect
    
    $ container run --rm --name blah alpine ping blah.container
    ping: bad address 'blah.container'
    

    update:

    something did listen on 53

    $ lsof -i :53
    $ netstat -an|grep 53 | grep LISTEN
    tcp6       0      0  *.53                   *.*                    LISTEN
    tcp4       0      0  *.53                   *.*                    LISTEN
    tcp4       0      0  127.0.0.1.53103        *.*                    LISTEN
    tcp6       0      0  *.55364                *.*                    LISTEN
    tcp4       0      0  *.55364                *.*                    LISTEN
    tcp6       0      0  *.55363                *.*                    LISTEN
    tcp4       0      0  *.55363                *.*                    LISTEN
    tcp4       0      0  *.65341                *.*                    LISTEN
    
  4. seven1240 commented on Aug 10, 2025

    @seven1240
    Author

    update again: with sudo it I do see the _mdnsresponder when container is running and gone when container stop.

    sudo lsof -i :53
    COMMAND   PID           USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
    mDNSRespo 470 _mdnsresponder   31u  IPv4 0xf57ad0130dbef0ee      0t0  UDP *:domain
    mDNSRespo 470 _mdnsresponder   78u  IPv6 0xece16e548cb73609      0t0  UDP *:domain
    mDNSRespo 470 _mdnsresponder   79u  IPv4 0x27c4f13197cd1d8c      0t0  TCP *:domain (LISTEN)
    mDNSRespo 470 _mdnsresponder   81u  IPv6 0x13761bbc6d7520fd      0t0  TCP *:domain (LISTEN)
    
  5. seven1240 commented on Aug 10, 2025

    @seven1240
    Author

    now I see dnscrypt running

    dnscrypt- 21037           root    6u  IPv4 0x1fb565b4d021c928      0t0  UDP localhost:domain
    dnscrypt- 21037           root    7u  IPv4 0xc318e99643fd3403      0t0  TCP localhost:domain (LISTEN)
    

    I have no idea when I might installed that, but I stopped with brew services stop dnscrypt-proxy and now it works.

    container run --rm --name blah alpine ping apple.com
    PING apple.com (17.253.144.10): 56 data bytes
    64 bytes from 17.253.144.10: seq=0 ttl=55 time=3.538 ms
    64 bytes from 17.253.144.10: seq=1 ttl=55 time=5.532 ms
    

    but local container domain seems not working

    container run --rm --name blah alpine ping blah.container
    ping: bad address 'blah.container'
    

    trying

    $ container system dns default set ct
    ct
    $ container system dns default inspect
    ct
    $ container run --rm --name blah alpine ping blah.ct
    ping: bad address 'blah.ct'
    

    anything I'm doing wrong?

    Thanks.

  6. jglogan commented on Aug 10, 2025

    @jglogan
    Contributor

    what does ls /etc/resolver show?

  7. seven1240 commented on Aug 10, 2025

    @seven1240
    Author
    $ container system dns default set ct
    ct
    
    $ cat /etc/resolver/containerization.ct
    domain ct
    search ct
    nameserver 127.0.0.1
    port 2053%
    
    $ ls /etc/resolver
    containerization.ct
    
    $ container system dns default clear
    Unset the default local DNS domain
    
    $ ls /etc/resolver
    containerization.ct
    
  8. jglogan commented on Aug 14, 2025

    @jglogan
    Contributor

    @seven1240 does scutil --dns show your domain?

    You should see something like (I have the domain test configured; you should see something for domain ct):

    resolver #11
      domain   : test
      search domain[0] : test
      nameserver[0] : 127.0.0.1
      port     : 2053
      flags    : Request A records, Request AAAA records
      reach    : 0x00030002 (Reachable,Local Address,Directly Reachable Address)

    If that's there can you try running a container like this?

    container run -d --rm --name web.ct python:slim python3 -m http.server --bind 0.0.0.0 8000

    and then try doing a lookup on the container from your host?

    dig -p 2053 @127.0.0.1 web.ct

    For example on my system I see:

    % dig -p 2053 @127.0.0.1 web.test                                                             
    
    ; <<>> DiG 9.10.6 <<>> -p 2053 @127.0.0.1 web.test
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49612
    ;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;web.test.			IN	A
    
    ;; ANSWER SECTION:
    web.test.		5	IN	A	192.168.64.3
    
    ;; Query time: 3 msec
    ;; SERVER: 127.0.0.1#2053(127.0.0.1)
    ;; WHEN: Thu Aug 14 12:04:31 PDT 2025
    ;; MSG SIZE  rcvd: 42

    If that works, then try hitting your server:

    curl http://web.ct:8000
  9. seven1240 commented on Aug 15, 2025

    @seven1240
    Author

    Everything works like you did. But I find it might be a Alpine problem, curl and dig works but ping fails.

    container run -it --rm --name blah.ct alpine sh
    apk add curl bind-tools
    / # ping web.ct
    ping: bad address 'web.ct'
    / # dig web.ct
    
    ; <<>> DiG 9.20.11 <<>> web.ct
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10832
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    ;; WARNING: recursion requested but not available
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;web.ct.				IN	A
    
    ;; ANSWER SECTION:
    web.ct.			9	IN	A	192.168.64.2
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.64.1#53(192.168.64.1) (UDP)
    ;; WHEN: Fri Aug 15 10:19:18 UTC 2025
    ;; MSG SIZE  rcvd: 51
    
    / # curl web.ct:8000
    <!DOCTYPE HTML>
    <html lang="en">
    <head>
    ...
    
  10. seven1240 commented on Aug 15, 2025

    @seven1240
    Author

    Ping on debian image works. I think I can close this one now. Thanks for help. I also upgraded to macOS 26 Beta3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions