What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

More DNS Servers..

muffintastic

Senior Member
Hi.

I would like to add Google's IPV4 and OpenDNS IPV4 all in the WAN section of my router. I know this isn't possible through the GUI itself and also in the DHCP LAN Option, So it advertises All of Google's DNS and OpenDNS in my network connection on my laptop. same goes for IPV6 DNS entries.

Is it possible by a script and if so could someone dump the code, I also don't know how to add a script to the router, do I just open Notepad copy and paste and save it without an extension.
 
Do you really want to add DNS servers to the DHCP LAN options? That's not a good idea IMHO because then local name resolution won't work and you loose the speed benefit of having a local caching DNS server.

You can already specify 2 upstream DNS servers in the WAN settings. What are you trying to achieve by having more?
 
Do you really want to add DNS servers to the DHCP LAN options? That's not a good idea IMHO because then local name resolution won't work and you loose the speed benefit of having a local caching DNS server.

You can already specify 2 upstream DNS servers in the WAN settings. What are you trying to achieve by having more?

OK, for your first response guess I'll disable that. Secondly if other FW like Pfsense/OpenWRT offer the ability (which I've tested) failsafe if Google by some miracle flops up I can revert to OpenDNS. Why shouldn't this be achievable in Merlin FW
 
Secondly if other FW like Pfsense/OpenWRT offer the ability (which I've tested) failsafe if Google by some miracle flops up I can revert to OpenDNS. Why shouldn't this be achievable in Merlin FW
It is achievable, I'm just trying to understand what your objective is and what failure scenario you are trying to mitigate. You could set WAN DNS1 to Google and WAN DNS2 to OpenDNS.
 
It is achievable, I'm just trying to understand what your objective is and what failure scenario you are trying to mitigate. You could set WAN DNS1 to Google and WAN DNS2 to OpenDNS.

I'd like to have it setup like this:

8.8.4.4
8.8.8.8
208.67.220.220
208.67.222.222

What would be the right way of creating a script or whatever?
 
I'd suggest that you setup 2 of the DNS servers on the WAN page as normal, i.e. 8.8.4.4 and 8.8.8.8. Then create the following wan-start user script to add any additional servers:

Code:
#!/bin/sh

echo "nameserver 208.67.220.220" >> /tmp/resolv.conf
echo "nameserver 208.67.222.222" >> /tmp/resolv.conf
 
resolv.conf has a limitation of a max of 3 nameserver entries. If you have more than that, they will be ignored
 
resolv.conf has a limitation of a max of 3 nameserver entries. If you have more than that, they will be ignored
I don't think that limitation applies to dnsmasq:
Code:
Oct  2 13:31:17 dnsmasq[16309]: time 1419182
Oct  2 13:31:17 dnsmasq[16309]: cache size 1500, 0/789 cache insertions re-used unexpired cache entries.
Oct  2 13:31:17 dnsmasq[16309]: queries forwarded 298, queries answered locally 103
Oct  2 13:31:17 dnsmasq[16309]: server 194.168.4.100#53: queries sent 160, retried or failed 0
Oct  2 13:31:17 dnsmasq[16309]: server 194.168.8.100#53: queries sent 106, retried or failed 0
Oct  2 13:31:17 dnsmasq[16309]: server 2001:470:20::2#53: queries sent 55, retried or failed 0
Oct  2 13:31:17 dnsmasq[16309]: server 208.67.220.220#53: queries sent 66, retried or failed 0
Oct  2 13:31:17 dnsmasq[16309]: server 208.67.222.222#53: queries sent 50, retried or failed 0

EDIT: you are correct in the sense that Linux has a limit of 3 nameservers in /etc/resolv.conf. But dnsmasq gets around this by having its own resolv-file (/tmp/resolv.conf).
 
Last edited:
I'm struggling to understand the need for all these name servers. When would a person need this redundancy?
 
The need for that level of redundancy isn't needed when you are using properly redundant and distributed DNS servers like those from Google or OpenDNS. Back when your local ISP ran their own craptacular DNS servers, you never knew which one was going to functional and you needed 3 or more to be sure things were going to work well. With AnyCast and the other fanciness they use these days, you should be pointing to no more than 2 and call it a day.
 
The need for that level of redundancy isn't needed when you are using properly redundant and distributed DNS servers like those from Google or OpenDNS. Back when your local ISP ran their own craptacular DNS servers, you never knew which one was going to functional and you needed 3 or more to be sure things were going to work well. With AnyCast and the other fanciness they use these days, you should be pointing to no more than 2 and call it a day.
I suppose if I had to play devil's advocate I could see a situation where you want to use one pair of DNS servers (perhaps your ISP's) by preference for their speed, but have another pair available as backup.

There was another thread about DNS servers a while back discussing situations where access to all DNS servers was unreliable. By modifying dnsmasq to query multiple DNS servers simultaneously they improved their browsing experience.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top