I would like to serve custom DNS server to dhcp clients. How I can achieve that in openWrt?

  • 2
    This question is not too broad because it gets very specific answers. It's sad that basic idea of asking questions and getting answers is corrupted by policies abuse... – pixel Jan 30 '15 at 10:26

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 :) – Reaces Jan 29 '15 at 12:30

If you have dnsmasq enabled you need to use DHCP-option 6

So in /etc/dnsmasq.conf you would add:


To add the google DNS servers

  • What does option 6 do? What are the other options (e.g. 1-5)? – craibuc Aug 2 '18 at 13:27

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