How to Configure DNS (OpenDNS etc) and remove your ISPs DNS
THE SHORT ANSWER
Network => Interfaces => WAN => EDIT => Common Configurations => Advanced Settings
Use DNS servers advertised by peer Uncheck
Use Custom DNS Servers [Add your DNS servers here]
Save and Apply
Reboot
THE LONG STORY
I realized yesterday after reading this post that I did not have my DNS servers configured as I wanted, but still not clear on how to do this. https://forum.openwrt.org/viewtopic.php?id=60477
In Luci Status => Overview Network => IPV4 WAN Status I have 4 entries, and I only want the first 2.
DNS 1: 209.244.0.3
DNS 2: 209.244.0.4
DNS 3: 208.59.247.45
DNS 4: 208.59.247.46
I now know the following:
Network => Interfaces =>LAN =>EDIT => Common Configurations => Use Custom DNS Servers adds an entry to the /tmp/resolve.conf.auto file, which I believe is called by the /etc/config/dhcp file, in the config dnsmasq section: option resolvfile '/tmp/resolv.conf.auto'. The entry looks like
# Interface lan
nameserver 209.244.0.3
nameserver 209.244.0.4
I can add a section to the /etc/config/network file for the interface lan or wan as follows:
option dns '209.244.0.3 209.244.0.4'
and this is added to the resolve.conf.auto file.
There is a section in the resolve.conf.auto file that is for my ISP (RCN) as follows.
nameserver 208.59.247.45
nameserver 208.59.247.46
search cable.rcn.com
These are my ISP DNS servers, which I do not wish to use. I deleted them from the file, but they returned after a reboot.
Eventually I came across this post https://forum.openwrt.org/viewtopic.php … 28#p181228
In case any other noobs come across this, you have to uncheck the "Use DNS servers advertised by peer" setting under WAN > Advanced before you can set DNS servers for the WAN to use.
This check box controls the availability of the “Use Custom DNS servers” on the WAN side. It also adds a line to the config “ option peerdns '0' “ which appears to be the key in ignoring the ISPs DNS settings in the resolve.conf.auto file.
QUESTIONS
I have learned that I can set a DSN on the LAN side. What does this do, if anything? Do I want this?
Where does DNSMASQ actually stores its data (cache), and how do I view this?
Public DNS Servers
http://pcsupport.about.com/od/tipstrick … ervers.htm
http://www.getdriver.com/how-to/2498/fr … ience.html
(Last edited by RangerZ on 25 Oct 2015, 00:26)