3 ms·
This seems to be a standard feature in many routers now. The computer name sent with the DHCP request will eventually land in the resolver's hosts table and it
by Mister_Snuggles 8y ago
This seems to be a standard feature in many routers now. The computer name sent with the DHCP request will eventually land in the resolver's hosts table and it will respond to DNS requests as expected. It's client-controlled, which is kind of not great, but for home users it works as intended.
What I'd like to see is a home router that lets me put arbitrary rules in. Currently I use dnsmasq as a resolver and it basically does what I need, but I'd rather have it running on the router instead of needing another computer.
My current rule set is roughly:
* Resolve from local hosts file - this is where I put my statically assigned home servers/devices.
* If the domain request matches .domain.tld, forward it to a.b.c.d for resolution - this is a dnsmasq running on a remote box and covers off VMs that I run there. There is an IPSec tunnel (running on a small VM) and static routes on my router that handle getting to that box.
Finally, pass the request onto my router which will pass it onto my ISP or use its local DHCP-driven hosts table to resolve it.
I'd love it if an off-the-shelf router could do this. Currently I'm using a UniFi Security Gateway and it seems like this feature set would be a good fit. The router is professional-enough that advanced features like this make sense.
- secure 8y agoHave a look at router7’s dnsd, it’s not that complicated: https://github.com/rtr7/router7/blob/master/cmd/dnsd/dnsd.go https://github.com/rtr7/router7/blob/master/cmd/dnsd/dnsd.go You could easily fork it and extend it to implement your custom rules. I’ve done Go cross-compilation for running on Ubiquiti gear before, and it worked. So, if you’re willing to spend the effort, you could do it :).
- jethro_tell 8y agoI have this set up in my house. I have a tld and internally I want the IP to resolve to the land IP and externally, to the ISP ip. I also have local caching for things like imap, but slow uploaded so I don't host my full email and web mail stack there. I run 2 dns servers usually on the same box on different bind addresses. You'd run a caching resolver on the gw ip and forward requests for my.tld to the second resolver which is configured to be authoritative for my.tld. the hosts can then be configured either through DHCP or statically. This is a pretty common technique to make enterprises Intranets. Added benefit is that when you did a file transfer between Lan hosts with the globally accessable DNS, the transfer stays on the LAN. Also ssh host works in you ssh config regardless of location.
- voltagex_ 8y agoWhich Ubiquiti gear? I wasn't expecting one component to be on MIPS, one component to be on ARM7 without hardfloat and one component to be ARM7-A with vfp4. I guess Go's cross compilation makes it easier. PS: Without hardware offload, the 8 port POE switch only manages 12 megabits / second.
- secure 8y agoIn my case, I was cross-compiling for the EdgeRouter Lite, which is a MIPS device.
- voltagex_ 8y agoI'm running a similar setup (although without IPsec). My compromise was to have name.int.my.domain resolve internally and name.my.domain resolve externally (easier with ipv6). dnsmasq should be able to do what you want to do and it can be enabled on the USG - at least from the controller.