|
I've recently come up with what I think is an even better solution. If someone's already done it, I have no idea. I just went ahead and implemented it because I thought it'd be interesting. The concept is that, instead of assuming that IP and MAC addresses are at all reliable, to "fingerprint" devices on the LAN based on things such as SSH public keys, TLS SPKI fingerprints, UPnP device UUIDs, mDNS, common TCP port profiles, and IEEE OUI manufacturer in order to form mostly-stable identities. The IP and full MAC are only fallen back to when there's absolutely no other data to work off of. My software uses a daemon that scans the network in order find devices and update existing device identities if IPs change. It serves hostnames for these devices on the `.home.arpa` TLD and creates synthetic IPv6 addresses for each device in case one would rather use their own DNS server or hosts file. I recently "finished" this project, and it's kind of awesome because I was able to swap to a new router and everything just kept working as-is without having to think about it. Of course mDNS solves a lot of these problems already, but not every device has mDNS. What's really cool is I recently realized that this is also very useful for accessing your local network with a VPN like Wireguard. Even though I only planned on this being something you run on individual clients, I put it on my OpenWrt router and configured it with dnsmasq so that, when I connect to my network with Netbird, all of my local hostnames just work on my phone by virtue of connecting to the network and using its DNS server. That said, my project doesn't require router admin access at all. It can even run as rootless if TUN access (for synthetic addresses) is turned off. Maybe I'll release it publicly at some point, but if anyone wants to steal this idea and do their own implementation, I am not territorial over it. It's made getting my LAN devices working together a joy. |