3 ms·
https://godoc.org/github.com/rtr7/router7/cmd/dnsd https://godoc.org/github.com/rtr7/router7/cmd/dnsd already resolves computer names from DHCP leases. Is that
by secure 8y ago
https://godoc.org/github.com/rtr7/router7/cmd/dnsd https://godoc.org/github.com/rtr7/router7/cmd/dnsd already resolves computer names from DHCP leases. Is that what you mean? If no, can you elaborate on what the use-case is?
Edit: forgot to mention, you can use static leases, too, permanently assigning an IP/hostname to a MAC address: just remove the expiration field in /perm/dhcp4d/leases.json :)
- grizzles 8y agoOh cool re: dnsd
- chrissnell 8y agoHere's a use case that I am currently doing at home: I have a live weather station [1] that pulls data from a Go-based service that I wrote and run on a server on my home network. When I'm outside of the house, mhkweather.com resolves to a Digital Ocean IP, where I run a proxy to forward requests back to home IP. However, when I'm at home, mhkweather.com resolves to a local 10.x.x.x IP and goes straight the the local service, no proxy. It faster this way. I want to be able to set DNS overrides for local things. I can do this with unbound but it would be nice if dnsd could do this for me. [1] https://mhkweather.com https://mhkweather.com
- secure 8y agoThanks for elaborating. For the time being, you’d need to modify dnsd to install your custom handler. It should be as simple as adding another server.mux.HandleFunc call in internal/dns/dns.go. If this turns out to be a feature which many people would like, I’ll think about how to best structure the code to make this easier.