-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict clients by MAC address #26
Comments
Per the RFC, mDNS requests and reponses are done in broadcast ( So regarding your question, it would be possible to filter the mDNS request by client : If we have Device 1 (D1) and Device 2 (D2), we would only forward However, there is a gotcha: The response will be sent to both |
Thanks, I was suspecting something like that. So D2 would probably be able to discover the "forbidden" device in some scenarios, right? I'm not familiar with the protocol but I'm guessing that if D2 wanted to cast to the "forbidden" device, the payload would contain the MAC address of the targeted device and at that point the message can be dropped by the reflector, right? |
Yes, For casting, this is done with another protocol (mDNS/Bonjour only does the "discovery" part): when |
Hmm, so I'd need some firewall rules for this as well. I'm looking at this product So this made me optimistic that it's possible to have two VLANS (one of the chromecasts, one for the client devices) and some arbitrary many-to-many relationship between those devices. Any idea how they get around the discovery issue? |
It would be possible by sending the response to Quoting https://tools.ietf.org/html/rfc6762#page-12 :
|
I see. What about emulating a Chromecast entirely? In that case, all clients would see the same (emulated) Chromecast that pretends to be always idle. Once a cast is initiated, the request will be relayed to the appropriate real-world device. This would of course reduce the assignment to many-to-one, because each client device is assigned to 0 or 1 Chromecasts. |
AFAICT, the most straightforward option would be to make the reflector send unicast responses instead of multicast/broadcast. You can do this by :
|
Seems worth a try even if it breaks the spec a little bit. However, I wont have the time to create the necessary test setup till April next year. |
I'm wondering if it would be possible to amend this software to facilitate MAC address restrictions on clients as well. Such a config file could look like this:
So in this example, device AA:BB:CC:DD:EE:FB (VLAN 1234) would be able to access AA:BB:CC:DD:EE:FF, but AA:BB:CC:DD:EE:FC (VLAN 1234) would not.
I'm not fluent in Go, so I'm asking if this seems feasible before I dive into it.
The text was updated successfully, but these errors were encountered: