Created
May 29, 2018 22:22
-
-
Save mpslanker/425ff49c928435c270666e912a4289d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configure | |
delete system name-server | |
set system name-server 127.0.0.1 | |
Since you are getting an IP on your WAN address via DHCP, you'll need to tell the dhcp-client not to add the ISP DNS servers to /etc/resolv.conf. | |
set interfaces ethernet eth0 dhcp-options name-server no-update | |
By default, dnsmasq will send queries to any of the upstream servers it knows about and tries to favour servers that are known to be up. If you want to query the servers in order instead, then add the following: | |
set service dns forwarding options strict-order | |
Then you can add your nameservers to dnsmasq. Change the 0's and 1's to the DNS address you want to use. Add more if you like. If using the strict-order option, add them in the order you want them to be queried. | |
set service dns forwarding name-server 0.0.0.0 | |
set service dns forwarding name-server 1.1.1.1 | |
Once you are happy with your settings, type the following to commit your changes and save the new config. | |
commit | |
save | |
Then, release and renew your WAN IP to remove the ISP servers from /etc/resolv.conf | |
exit | |
release dhcp interface eth0 | |
renew dhcp interface eth0 | |
Now, when you type 'show dns forwarding nameservers', it should look like this: | |
show dns forwarding nameservers | |
----------------------------------------------- | |
Nameservers configured for DNS forwarding | |
----------------------------------------------- | |
0.0.0.0 available via 'statically configured' | |
1.1.1.1 available via 'statically configured' | |
----------------------------------------------- | |
Nameservers NOT configured for DNS forwarding | |
----------------------------------------------- | |
127.0.0.1 available via 'system' |
Note the set service dns forwarding name-server ...
entries should be in reverse order
Check with show dns forwarding statistics
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original post by Cude74360 found here
https://community.ubnt.com/t5/EdgeRouter/DNS-Forwarding-Name-Servers/td-p/1117142