Repository navigation
Conversation
On Home Assistant OS, Music Assistant runs on the host network, and its connection to 172.30.32.1 is masqueraded to the host's LAN address, which is off the endpoint's subnet, so it was refused with 403. A peer holding one of this host's addresses could reach the bound address anyway; machines elsewhere on the LAN are still refused.
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Local pairing fails on Home Assistant OS. Music Assistant runs with
host_network: true, so its fetch ofhttp://172.30.32.1:<port>/goes out overlo, and HAOS's nat ruleip saddr 172.30.32.0/23 oifname != "hassio" masqueraderewrites the source to the host's LAN address. That address is off172.30.32.0/23, so the endpoint answered 403 (Pairing token endpoint refused 10.0.0.16: not on its subnetat debug), and Music Assistant loggedFetching the local token of <id> failed: HTTP 403.The admit now also lets in a peer whose address is assigned to one of this host's interfaces. A process on this host could reach the bound address anyway, so the boundary stays at "this host plus the address's subnet". A machine elsewhere on the LAN still gets 403, because its address isn't this host's.
local_addresses()lists every interface address with its prefix.local_subnet_of()now uses it, and so does the admit.is_local_address()checks for an exact address match, not a subnet match. A LAN neighbour shares the host's subnet, so a subnet match would let it in.Tests:
KnowsWhichPeersAreThisHost(the masqueraded host address is admitted; a neighbour on the same /24, another network, and non-addresses are refused) andListsThisMachinesAddresses(127.0.0.1 is listed, TEST-NET-1 is not). The README, Configuration and Advanced Usage text now say "subnet or this host".Tested on Home Assistant OS
HAOS amd64 with Music Assistant dev
2.11.0.dev2026112003, running the local-audio app built from this branch (34c15f5) with default options:Paired with server …and thenA server paired -- stopped serving the token on http://172.30.32.1:8929/, and Music Assistant logged no 403 after the restart.172.30.32.1:8939answered 200 to host-sourced requests, which arrive as10.0.0.16.172.30.32.1:8939timed out (no route) and<host LAN IP>:8939was refused (nothing listens there).