How do I use Pi-hole's built in DHCP server (and why would I want to)?

Using Your Existing Router For Network-wide Ad Blocking

You might not need to use Pi-hole's DHCP server: In many home environments, your router also functions as your DHCP server. In this case, you can often set Pi-hole to be the DNS server for your network clients in the router's DHCP (or LAN) settings page, which allows all of your network clients to block ads simply by connecting to the network.

Setting it up this way is also what makes Pi-hole very powerful for network-wide ad blocking.

When You Cannot Change LAN/DHCP Options In Your Router

Some routers (and even some Internet Service Providers) do not let you change these settings. In this case, using Pi-hole's DHCP server is very advantageous because you can still get automatic, network-wide ad ad blocking even if you can't make the necessary changes on existing hardware.

To Use Pi-hole's DHCP Server

  1. Disable the DHCP server on your router (this is a critical step--you will see red warning text when you enable the checkbox)
  2. Enable Pi-hole's DHCP server on the Settings page

Technically, this is all you need to do, as DHCP is meant to be easy for clients to get an address; if a DHCP server is on your network, network devices will find it. However, there are several additional options you can set for your DHCP server (and it's not just limited to what's currently available in our Web interface if you know how to edit the dnsmasq config file).

Advanced DHCP Settings

These settings are similar to what you would find on your router's DHCP server, so if you have ever adjusted those settings, these will look familiar.


Without getting too technical, enabling SLAAC and RA allows your network devices to auto assign themselves an IPv6 address.

DHCP Lease Time

This setting is how long your network devices keep their address assigned by DHCP. This will vary depending on your network.

DHCP Leases

This section allows you to assign DHCP reservations for your network devices. Enter the MAC address of the device and the IP address you want it to have. You can also give it a name so you can easily see what clients are accessing what domains via the query log. So instead of seeing just IP addresses on the dashboard and query log, you can see the client name.

Unable to Enable Pi Hole DHCP Server. Internet Access Lost
No internet on some devices after setting router to use Pi Hole as DNS server
Pi-Hole Not Blocking Ads on Clean Install with Asus router
Pihole DHCP writes to hosts file as well
Gargoyle router firmware
DHCP Settings on Router
DHCP Server Trouble
Problems with DHCP/DNS settings (stock router), PC over LAN and Smartphone over WLAN connections
DHCP setup didn't work - Entire network went dark
PiHole statistics show it working, but it doesn't block basic ads
Can't access Raspberry Pi (or internet) with Pi-hole as DHCP Server
Machine Name List
Pi-Hole not blocking anything
Why are Adverts on Some Domains Not Blocked?
Hostnames using router as DHCP
Pihole Not Working on Other Devices using a ZyXEL router
It Just doesn't seem to work
Turning off router DCHP
Pi-hole shows IPs instead of hostnames
What can I do if I can't change manually set the DNS server on my router?
Pi-hole and ddwrt settings
Pi-Hole not blocking ads
Pihole stops blocking ads
Pi-Hole is not working? why not
Web Interface not reachable with pi.hole
How to configure my D-LINK DSL-225 DHCP Server?
Pi-hole DNS server is not working
Millions of PTR Queries
Pfsense/pi-hole - all requests showing as localhost
Too many queries made when 'Conditional Forwarding' is enabled 8,894k denied requests (while asleep?)
Very new user
Router died, modem + pihole = slow?
Asus AC68
Didn't work
Hardware/Software Requirements
Not blocking ads on android phone
Namensauflösung funktioniert nicht mehr korrekt (Nur IP)
Can't access /admin (another webpage running there already)
Pi-hole querie/network queries empty
Need help getting other computers to use pi-hole
Can't use pi-hole DNS (or any DNS for that matter) on my Netgear C6300 router
Possible Routing Loop
Unable to synchronize system time, Pi-hole not working
No device names shown
Pihole breaks on system reboot
IPv6 not resolving hostnames
Install of PiHole on DLink Router not working
Conditional Forwarding doesn't work
Upgrade succeeded on Pi-Hole in a Container Station image on QNAP NAS
How to set pihole as DNS on Arris TG1682G router (Comcast)?
New PiHole setup not blocking on clients
Changing dns manually on pc kills internet
"No internet" when setting Pi-Hole as DNS server
Ads galore on devices after installing. Is this to be expected? Does it need to run a few days?
Problem on RealMe 6 device (Android)
Salt Fiber Box und DNS eintregen
Block a social media domain?
Conditional forwarding.. What is wrong?
PiHole stopped running.
Pi-hole DNS server is not working
Groups and DHCP
Do I use a DHCP Server for my pi hole?
LAN connected devices working but not WAN
[Fixed] PiHole Unable to Resolve DNS
Pi-Hole not working as expected
pi-hole and BT Wholehome
So, how can i make all the devices on my network automatically use my pi without having to configure things on each individual device?
Issues with British Telecom Smart Hub 2
Pi-Hole not blocking ads after reboot (debian 10)
Need Help Identifying Device Pounding PiHole Twice Every 2 Seconds
Pihole not working Raspi
Pi-Hole on RPi, different ip on eth0 and wlan0-- Issues?
DNS Requests not routed to pihole unless manually specified
Configuring DNS Server - LAN or WAN Settings on ASUS Router?
Pi-hole is not blocking ads
Dashboard update problem
DNS problems
AT&T NVG599 cannot change DNS to point pi-hole server
Router overrides Pi-hole after WAN IP refresh
Tons of hits from local address
Wieder Werbung auf OnePlus Nord 2
Long-term load (15min avg) larger than number of processors: 1.3 > 1 This may slow down DNS resolution and can cause bottlenecks
Pi-hole on Pi not working
DNS stops resolving very quickly after enabling pi-hole
Pihole not working correctly on mobile devices after ISP change
Pihole does not Block Queries, 0% Blocked displayed. But I dont see many Ads either
Pi-hole only working on one device at a time
Pihole Not Working on Other Devices using a ZyXEL router
New Pi-Hole questions
Pihole is not working - Help
Ads not blocked from Ubuntu VM after install. Perhaps router configuration?
Guide for less problematic setup?
Pi-hole not receiving queries?
Pi Hole running fine, DNS server not showing pi hole IP. VPN also not working
Pihole slows to a crawl unless I flush constantly
Pihole stops blocking ads
No access to admin page after PiHole installation
FTL issues: Connection refused. Is FTL running?
IPv6 & Armbian
piHole with Netgear R6400 using Tomato
IP Telefon geht nicht mehr
Pi-hole device can not access internet
Can't access internet v3.2.1 - Other devices OK
PI admin showing spinning wheel
Getting clients to show up
Manually DNS windows, have to manually change DNS every day
Pi-Hole not blocking ads
Setting up the rasberry pi hole
FTL is offline after update to 4.0
Devices do not use Pi-hole
No Internet Access
Setting up Pi-Hole on Asus router
Display all clients in Top List Clients
PI works when set to DNS on device, unable to resolve when configured on router
It doesn't block ads
Pi hole working (sort of, but not all the time!)
Pi-hole connected to the internet, but using manually setting the DNS on the router to the Pi-hole results in a "Bad Config" Error on Browser
Gargoyle, Pi-Hole, and Method 2 of setup
Asus AC68
1 Pi/2 Installs?
Pi.hole cannot be found
How to configure Pi-hole with my router?
Configuring the WAN DNS settings on router in light of pihole, AND UNbound running on pihole
Pi-hole and Virgin MediaHub problem
DNS Question - only getting IP addresses and not all equip is pointing to pi-hole
Pi-hole is active but doesn't resolve dns
Pihole not working on network
How to enable dynamic DNS updates from DHCP?
Pi-hole as DHCP server blocks nothing
Pihole not blocking any/very few ads.
How to make Pi-hole pick a specific host name?
Adding a host name error
Majority of traffic through one client (Eero settings)
Pi-Hole not working [Google Wifi]
Show name in Top Clients lists rather than IPv6 addresses
Pihole only blocks on wired connection

Hi, I am trying to see if this works for two networks? I use DietPi (Pi-hole Version v3.1.4 Web Interface Version v3.1 FTL Version v2.10) However, I don't see anything in the gui where I can add DHCP service for and


We have not exposed those kind of settings, if dnsmasq even supports it. Search for information on dnsmasq's DHCP config options.

9 posts were split to a new topic: Remove DHCP Leases

Is it possible to enable static DHCP entries where I can pick different default gateway per MAC address?
I need a few devices to be routed through VPN appliance (another Raspberry Pi) which is not my regular firewall.


We still use dnsmasq as the base program, so anything that you can set up via dnsmasq configurations would work. That would be something that could be done, just create two DHCP pools and assign the MAC to either pool, it would be manually done through the configuration files, but there are a number of guides out there that explain the DHCP pools with dnsmasq as it's a really powerful program.

1 Like

I'm thinking of changing the config files manually for now but it would be really good to have this option in the management interface.

You can open a Feature Request in that category and we'll have it vote-able by the community.

Thanks Dan. Will do.

Can I still just add my own dnsmasq config options in now that you've forked it for FTLDNS? I've had dnsmasq be my dns and dhcp server for ages and I'd like to keep my dhcp rules and subnets etc.

Where do I drop in dnsmasq config options? Do they still live in /etc/dnsmasq.d/?


And _FTL_DNS is just our fork of dnsmasq so any custom configs that work with dnsmasq will work with Pi-hole.

I red the topic very carefully, and I don't understand how can I do the following:
One of my pc in the network contain the pi-hole installation, and I want to relay all the network from my router to this pc, in order to use pi-hole for all my home network, instead of adding middle machine, like PI between the router and the modem to do pretty much the same.

  • Consider that I don't have the option to set VPN/DNS servers on my home router, I only have the option to set relay server.
    Can you please explain my what should I do?


Not quite sure what you mean by this.

You coud disable the router's DHCP server (that is a default, standard option available in all routers) and enable the DHCP server in the admin interface (of Pi-hole). That will ensure that all clients connecting to the network, LAN or WiFi will all get the Pi-hole IP as the DNS server.

3 posts were split to a new topic: DHCP server custom configuration

A post was split to a new topic: Cannot enable DHCP on Pi-Hole

A post was split to a new topic: Pi-Hole as DHCP - clients not getting IP

This guide missed something.
If your router have options about:

Enable Route Advertisement
Enable DHCPv6 Server

In the IP V6 section, disable them all and then tick Enable IPv6 support (SLAAC + RA) on Pi-hole web admin.

A post was split to a new topic: Using Pi-hole DHCP server

Do you mean disabling the first 2 settings in the screenshot?[Router Advertisement-Service & DHCPv6-Service] Then enable Enable IPv6 support (SLAAC + RA) ?

Yes, disabled IP v6 on router if it is enabled.

1 Like