DNS registration

Network → DNS registers the devices Netlens knows in your DNS server and keeps their addresses right when DHCP hands out a new one. It needs a DNS plugin (for example Technitium DNS, see plugins/technitium). You enter your networks and their zones (192.168.0.0/24 = home.example.com, one line per network, several zones are fine), press Read the DNS server now, and Netlens shows a preview: what it would add or update, what is a conflict, and what is left alone. Nothing is written until you approve it; once the preview is what you want you can switch on Apply automatically after every scan. With the Docker plugin you can also tick Give containers that share their host’s address a name: a running container on a bridge or host network that publishes a port then gets a CNAME to its host (web.home.example.com), and a container with its own network address is registered like any other device.

Safety is the point of the design: Netlens only changes records it created itself (marked with a comment, and remembered), and never changes a record that something else made. A Windows machine that registers itself leaves a record; Netlens recognises it (also when the name differs from the one Netlens would choose) and leaves it alone, shows Registers itself, and does not register Windows machines at all by default. A device without a record waits for a grace period (2 hours by default) before it is registered, only devices you marked as known are registered (a stranger cannot claim a name by announcing a hostname), and a name that is already used by a record pointing elsewhere is a conflict that you resolve by hand. Devices without a name get a generated one (tv-samsung-a1b2, from a pattern you can change) that stays the same afterwards, and every device has a DNS registration setting on its page (Automatic / Always register / Never register) and a field for its own DNS name. Removing records of devices that are gone is off by default, and a limit caps how many changes one run may make. DNS events (registered, updated, failed) go to the event log and can go to the notification channels.