I would like to serve custom DNS server to dhcp clients. How I can achieve that in openWrt?
2 Answers
DNS server adress corresponds to DHCP option 006.
According to the OpenWRT Wiki your /etc/config/dhcp
should look like
config 'dhcp' 'lan'
...
list 'dhcp_option' '6,yourDNSIP'
-
Seems like you beat me to it by a few seconds, I'll leave my answer open as it is dnsmasq specific :)– ReacesJan 29, 2015 at 12:30
If you have dnsmasq enabled you need to use DHCP-option 6
So in /etc/dnsmasq.conf
you would add:
dhcp-option=6,8.8.8.8,8.8.4.4
To add the google DNS servers