Problem connecting to Home Assistant via SMB from macOS Big Sur

This is a bit weird, and I don’t know how to diagnose further. I have Home Assistant set up and running, with the Samba share add-on configured and running.

  • I can connect to Home Assistant via SMB from my older laptop running macOS 10.14 (Mojave). This has been working for a year.
  • I can’t connect to Home Assistant from my new laptop running macOS 11.1 (Big Sur).

The error I receive in the Mac UI is:

There was a problem connecting to the server “home assistant.local”.
The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again.

This is the macOS Finder error you receive when the Samba server denies the connection, and indeed, when I look in the add-on’s logs, I see the rejection:

Denied connection from fe80::4b9:b17:f0d0:66f8 (fe80::4b9:b17:f0d0:66f8)
Connection denied from ipv6:fe80::4b9:b17:f0d0:66f8:53627 to ipv6:fe80::fd8c:19a5:c8eb:f70a:445

But this is where it’s weird. The IPv4 address for this laptop is most definitely on the allow_hosts list. I’m not using IPv6 on my network. At all. Never have. So why is the connection attempt trying to use IPv6?

When I connect from the older version of macOS, the authentication message (success) shows an IPv4 address.

When I connect from the new laptop to my Synology NAS via SMB, it works fine. I’m not sure where to examine the connection details, though, so I can’t verify if Synology is just handling an IPv6 address without being asked.

I suppose I can try adding the IPv6 address to allow_hosts but that seems like a band-aid, rather than solving the problem.

Any suggestions for further testing or diagnosis?

i think this is more a problem of your samba settings then big sur related. probably to take this ipv6 and whitelist it could solve your problem. dont know why its the ipv6 but it is, you could use a more general whitelist setting for the ipv6 range

I do use Big Sur (with 2013 Mac Pro) with no issues, so I’d not link this to Big Sur as such.
Did you try to compare your network settings between these 2 laptops? Especially Advanced options and how to IPv6 is configured? Make sure all things (except of IP address, of course) are set identically.
BTW I’ve never used specific allowed_hosts for enabling connection to HA. I just put there entire subnet (192.168.x.0/24) or lef default 192.168.0.0/16 for this purpose.

I don’t see how it can be a problem with the Samba settings on Home Assistant. My other Mac connects using IPv4. What setting could be in the Samba add-on that would cause the client to use IPv6? There just aren’t any options for the Samba add-on that are related. And there are effectively no settings for SMB on macOS, unless you create the configuration file yourself, and put it in the right place.

As for a more general whitelist, I’m of the security mindset of allowing the minimum required access to do the job. There’s only one client that needs access to the SMB share on Home Assistant, and that’s my Mac.

It’s arguably overkill for a home network. Then again, we’ve seen plenty of malware, botnets, and so on that start with IoT devices, of which we all have plenty (or we wouldn’t be using Home Assistant). I don’t trust them, and I don’t want to depend on Samba being non-exploitable. My password is strong, but blocking at the IP level is an extra layer. Belt and suspenders.

When I add the IPv6 address to the allowed_hosts, I’m able to access Home Assistant via SMB. So, I have access, and can declare “problem solved” if I want to. But it’s still troubling that my brand new Mac is using IPv6 for this.

And yes, I’ve compared the settings in the Network preferences pane. I painstakingly compared the settings from one to the other. They’re the same, across every setting that’s not host-specific (hostname, NetBIOS name, etc.), or specifically different between Mojave and Big Sur.

Hmmm. Now that I’ve written that, one of those OS version differences is an option on the Wi-Fi interface to “Show legacy networks and options”, which is disabled on Big Sur, and not present on Mojave. I wonder if that could be it? Makes no sense, there’s no IPv6 address set, the whole IPv6 area is blank in the TCP/IP section, other than the default “Automatic” option. (Same on both machines.)

I suppose all I can do at this point is wait and see if there are issues reported, here or elsewhere, with SMB and Big Sur. (Which many people call “Bug Sur” instead; it’s certainly noticeably more quirky and problematic than Mojave in the month I’ve been using it. I’ve actually had to reboot my computer to resolve some problems, which is something I haven’t needed to do in 10+ years with macOS/Mac OS X… Looking forward to a few more patch releases…)