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

  • 3
    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
    Commented Jan 30, 2015 at 10:26

2 Answers 2


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
    Commented Jan 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:


To add the google DNS servers

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

Not the answer you're looking for? Browse other questions tagged .