Solving DHCP issue after installing Pi-Hole on Raspberry Pi 3 as AP

After setting up successfully my RB3 as an access point I realized that after installing Pi-Hole Raspbian DHCP service (dnsmasq) was down, it seems that Pi-Hole comes with its own DHCP and DNS service (pihole-FTL based on dnsmasq), as we customize dnsmasq to RB3 run as our AP so the idea to fix this little issue is just to enable DHCP server and use the same configuration mentioned in my previous entry, to enable DHCP server we need to login in Pi-Hole admin web interface and then select Settings and select this check:

Once these settings are saved (Save button) then a file is created with default settings called 02-pihole-dhcp.conf, (although is never recommended) it can be touched manually to add our previous dnsmasq configuration:

# vim /etc/dnsmasq.d/02-pihole-dhcp.conf
dhcp-authoritative
interface=wlan0 
listen-address=10.111.11.1
bind-interfaces 
bogus-priv
dhcp-range=10.111.11.120,10.111.11.135,255.255.255.0,24h
dhcp-option=option:router,10.111.11.1
dhcp-leasefile=/etc/pihole/dhcp.leases
server=8.8.8.8
domain=acme.local

Moreover for my current network configuration I added to following line to the end of the main Pi-Hole FTL configuration file, so once my network interface were UP default route is properly configured:

# vim /etc/dnsmasq.d/01-pihole.conf
...
dhcp-option=option:router,10.111.1.1

# systemctl restart pihole-FTL
AP-client# cat /etc/resolv.conf 
# Generated by NetworkManager
search acme.local
nameserver 10.111.11.1
nameserver 8.8.8.8

And that’s it, the problem is fixed!


Tell me and I forget. Teach me and I remember. Involve me and I learn
— Benjamin Franklin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s