balena-io / balena-cli

The official balena CLI tool.
Apache License 2.0
455 stars 141 forks source link

macOS internet connection sharing doesn't show `local scan` devices #1427

Open hedss opened 5 years ago

hedss commented 5 years ago

When Internet Connection Sharing (ICS) with a device, whilst that device does use the host machines connection for sharing, it doesn't show up via a balena local scan. However, MDNS is working on the device, and records are being passed. From the host machine:

$ dns-sd -B _ssh
Browsing for _ssh._tcp
DATE: ---Thu 12 Sep 2019---
14:01:22.328  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
...
14:01:22.329  Add        3  14 local.               _ssh._tcp.           f2a1f0d
14:01:22.329  Add        3  13 local.               _ssh._tcp.           f2a1f0d
...

Furthermore, this isn't Avahi dropping SRV/A/TXT records (which sometimes it does, given the known bug):

$ dns-sd -G v4 f2a1f0d.local
DATE: ---Thu 12 Sep 2019---
14:02:08.988  ...STARTING...
Timestamp     A/R    Flags if Hostname                               Address                                      TTL
14:02:09.194  Add        3 14 f2a1f0d.local.                         192.168.2.2                                  120
14:02:09.194  Add        2 13 f2a1f0d.local.                         192.168.2.2                                  120

It looks like because the ICS is rebinding to a separate subnet for the passthrough, the MDNS module (https://github.com/balena-io-modules/multicast-dns#listen-on-all-interfaces) isn't picking this up. Need to look into this and see exactly what's going on.

pdcastro commented 4 years ago

Connects to: