zerotier / zeronsd

A DNS server for ZeroTier users
https://zerotier.com
BSD 3-Clause "New" or "Revised" License
493 stars 56 forks source link

not listening on rfc4193 address on macos #210

Open laduke opened 1 year ago

laduke commented 1 year ago

Hmm, for me at the moment, it should be listening on a v4 and v6 address, but it's not listening on v6. 🤔

Mar 16 16:22:10.282  INFO zeronsd::init: Welcome to ZeroNS!
Mar 16 16:22:10.792  INFO zeronsd::init: Your IP for this network: fd15:9924:d630:f690:3d99:93e7:50c5:1646
Mar 16 16:22:10.792  INFO zeronsd::init: Your IP for this network: 172.24.8.153

lsof is strange on mac

here's a command that shows something like the right output

sudo lsof -aP -iUDP  | grep zeronsd
zeronsd   20631           root   12u  IPv4 0x6caae65784840593      0t0  UDP 172.24.8.153:53

if i start it without rfc4193 enabled, it still works on ipv4. not sure if related to #199

erikh commented 1 year ago

Sure it's not firewall?

------- Original Message ------- On Thursday, March 16th, 2023 at 4:31 PM, Travis LaDuke @.***> wrote:

Hmm, for me at the moment, it should be listening on a v4 and v6 address, but it's not listening on v6. 🤔

Mar 16 16:22:10.282 INFO zeronsd::init: Welcome to ZeroNS! Mar 16 16:22:10.792 INFO zeronsd::init: Your IP for this network: fd15:9924:d630:f690:3d99:93e7:50c5:1646 Mar 16 16:22:10.792 INFO zeronsd::init: Your IP for this network: 172.24.8.153

lsof is strange on mac

here's a command that shows something like the right output

sudo lsof -aP -iUDP | grep zeronsd zeronsd 20631 root 12u IPv4 0x6caae65784840593 0t0 UDP 172.24.8.153:53

if i start it without rfc4193 enabled, it still works on ipv4. not sure if related to #199

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

laduke commented 1 year ago

pertty sure. I can bind nc on a zerotier interface on 53/udp and then talk to it.

erikh commented 1 year ago

hmm ok. I can look at this over the weekend I suppose if you'd like that.

------- Original Message ------- On Friday, March 17th, 2023 at 8:08 AM, Travis LaDuke @.***> wrote:

pertty sure. I can bind nc on a zerotier interface on 53/udp and then talk to it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

laduke commented 1 year ago

Thanks! I don't think this is hurting many users. So no worries.

It works sometimes but not others! Most often not.

It's failing at TcpListener::bind(sa).await?

error Os { code: 49, kind: AddrNotAvailable, message: "Can't assign requested address" } - fd15:9924:d630:f690:3d99:93e7:50c5:1646

That's fun.

200 listnetworks 159924d630f6903d lonely_szpakowski 3e:77:a6:f5:c0:62 OK PRIVATE feth3122 fd15:9924:d630:f690:3d99:93e7:50c5:1646/88,172.24.8.153/16
ifconfig feth3122
feth3122: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 5000 mtu 2800
        ether 3e:77:a6:f5:c0:62 
        inet 172.24.8.153 netmask 0xffff0000 broadcast 172.24.255.255
        inet6 fe80::3c77:a6ff:fef5:c062%feth3122 prefixlen 64 scopeid 0x15c 
        inet6 fd15:9924:d630:f690:3d99:93e7:50c5:1646 prefixlen 88 
        peer: feth8122
        nd6 options=201<PERFORMNUD,DAD>
        media: autoselect
        status: active

it could just be that macos is bad

erikh commented 1 year ago

Are you sure the IP has been bound to the interface and was stable? I know you probably did, but just to be thorough I thought I'd ask.

I have a mac here, I can look into it.

------- Original Message ------- On Friday, March 17th, 2023 at 9:55 AM, Travis LaDuke @.***> wrote:

Thanks! I don't think this is hurting many users. So no worries.

It works sometimes but not others! Most often not.

It's failing at TcpListener::bind(sa).await?

error Os { code: 49, kind: AddrNotAvailable, message: "Can't assign requested address" } - fd15:9924:d630:f690:3d99:93e7:50c5:1646

That's fun.

200 listnetworks 159924d630f6903d lonely_szpakowski 3e:77:a6:f5:c0:62 OK PRIVATE feth3122 fd15:9924:d630:f690:3d99:93e7:50c5:1646/88,172.24.8.153/16

ifconfig feth3122 feth3122: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 5000 mtu 2800 ether 3e:77:a6:f5:c0:62 inet 172.24.8.153 netmask 0xffff0000 broadcast 172.24.255.255 inet6 fe80::3c77:a6ff:fef5:c062%feth3122 prefixlen 64 scopeid 0x15c inet6 fd15:9924:d630:f690:3d99:93e7:50c5:1646 prefixlen 88 peer: feth8122 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active

it could just be that macos is bad

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

laduke commented 1 year ago

try multiple times! this is on main btw.

yeah. this isn't via the tests. using the actual app. so the address has be up and running for a long time, i can ping it, zeronsd does work on it sometimes.

erikh commented 1 year ago

Hmm. Ok, I will attempt to look into it this weekend. A lot is going on, so I apologize in advance if I space this.

------- Original Message ------- On Friday, March 17th, 2023 at 10:40 AM, Travis LaDuke @.***> wrote:

try multiple times! this is on main btw.

yeah. this isn't via the tests. using the actual app. so the address has be up and running for a long time, i can ping it, zeronsd does work on it sometimes.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

laduke commented 1 year ago

I can't reproduce this lately btw. 🤷 Might be some rare side effect only triggered by running tests and restarting the app 100s of times