25

I need to change my firewall/router, and I'd prefer something with built-in DNS to resolve queries on the local subnets. I've got a mixed Linux/Windows system, often with only one computer turned on, and I frequently have problems resolving local names. I don't want to keep a Linux box permanently on just for DNS, and I'd prefer to have DNS in my router appliance, which is always on.

I search Google for this occasionally but never find anything. You always get the obvious answers - it's not possible, put everything in /etc/hosts, NetBIOS, dedicated box, etc. So what am I missing? Why don't "cheap" routers let you do this? I'm pretty sure that Cisco kit does this. Almost all cheap routers will let you do MAC address reservation, to let them assign static IP addresses for DHCP. So why can't they simply do DNS as well for everything on the local subnets, just passing through remote domains to the ISP?

  • 3
    Get a Linksys WRT54GL for around 50$, install OpenWRT firmware on it and you'll have a DNS server that resolves local names. But still pretty much offtopic on stackoverflow... – fvu Jul 18 '11 at 11:56
  • 2
    Don't forget the other classics, DD-WRT and Tomato! – Darth Android Jul 18 '11 at 14:06
  • some @Grumby on a whirlpool forum said that a public domain name costs less than a dedicated router/DNS server hardware to do local DNS. I just set up a new domain and set up synthetic subdomain forwarding in about 20 minutes to the same effect for only $12. So if you want something you can have up and running for cheap without having to get any new hardware don't forget that is an option. – ComradeJoecool Oct 16 '19 at 1:20
24

The DNS protocol is in reality quite complicated, especially the recursive function, and most routers can't even proxy DNS properly and in conformance with the DNS RFCs, let alone act as a proper DNS server. See RFC 5625.

The best routers for DNS functionality are those that use dnsmasq software internally, running on top of a Linux kernel.

Ob. Disclaimer - I wrote that RFC.

| improve this answer | |
  • This doesn't really answer the question. – UuDdLrLrSs Aug 21 '18 at 0:19
  • 1
    @DaveInCaz TL;DR version - the DNS protocol (especially the recursive function) is too complicated for most router vendors to implement correctly. – Alnitak Aug 21 '18 at 18:21
  • I would have thought that there was some off the shelf DNS that they would tend to use; or at least, that some vendors could use if they wanted to differentiate their products. – UuDdLrLrSs Aug 21 '18 at 18:35
  • @DaveInCaz yes, I mentioned that in my answer. Note that "off the shelf" also implies "portable", so needing something like a multi-tasking POSIX environment. Many routers don't have that, they run bespoke embedded code. – Alnitak Aug 21 '18 at 18:42
  • Your comments here are useful, you might consider adding them to the answer to give it a fuller explanation. As it stands right now the first sentence might sound a little flippant, even though clearly you meant it quite seriously (and all the upvoters obviously agree). So adding some more details could make your point more clear. – UuDdLrLrSs Aug 21 '18 at 18:46
9

using a flashable router like the WRT* family from Linksys, you can install OpenWRT or Tomato; theses two firmwares should give you access to a wide range of tools.

The list of supported devices for OpenWrt may open other options; perhaps you can recycle an older router from the list.

| improve this answer | |
  • However, this option is restricted to a limited list of routers. – SaidbakR Mar 1 '17 at 17:14
2

I'd suspect that the use case for cheaper router manufactures is that the only thing you do is connect to the outside internet. Why would you want to communicate between devices on the home network?

The correct thing for them to do is to automatically add the DNS entry when it does DHCP, and, when the DHCP lease expires and is not renewed then remove the DNS entry.

You can do this with OpenWRT. You can also setup your own dhcp/dns server and use that for DHCP rather than the cheap router.

| improve this answer | |
2

"Mom and Pop Ltd." don't need such stuff.

As you noticed, Cisco stuff can do it, but it cost an order more than SOHO hardware. Not only it makes people buy more expensive hardware it also decreases number of support calls ("after i put facebook on router with my IP, I can't check my status, that's outrageous!")

You can either use already suggested OpenWRT supported routers or buy vyatta based router (or re purpose an old PC).

| improve this answer | |
1

As others have mentioned, there is a "how" with custom firmware, and the "why" is Cisco doesn't want small businesses which require that feature to skip over some of their lower end enterprise routers. It's all about "you get what you pay for". For a small company with 5 employees, but needs DNS, it would be a good $50 solution. Too cheap for Cisco, and considering that most home users don't need DNS, why put it there?

In addition, it's likely that the devices tend to be underpowered for those purposes. Home routers really don't have the horsepower to do NAT; DHCP; and DNS at the same time. While I am sure it's possible by installing custom firmware, it might not perform as desired.

| improve this answer | |
  • 8
    providing DHCP and DNS is easier on the CPU than tracking 10k connections from bittorrent client. – Hubert Kario Jul 18 '11 at 12:06
0

This is one of the reasons I bought a Guruplug and turned it into a Linux-based router with bind installed for DNS.

DNS is a bit technical and most consumer-level router/switch combinations seek to be easy to use for the average, non-technical user. It's bad enough trying to explain to those who know nothing about networking what a MAC address is, or how DHCP works. It also introduces one more thing that can go wrong or be misconfigured and be the source of product returns or support calls.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.