Existing DNSMASQ + Pi-Hole

Expected Behaviour:

Use existing installed DNSMASQ together with pi-hole FTL without interuptions

Actual Behaviour:

DNS service is not started during installation

Debug Token: ersoo8bxnd

Hi, I'm using my PI as DNS and DHCP server with DNSMASQ, I tried to install pi-hole but it could not start dns service.
Then I learned that it's using own FTL dns. Is there any way to install pi-hole without interupting existing dns / dhcp?

Pi-Hole will perform both of these functions. Your existing dnsmasq configuration files can still be used.

You will need to stop dnsmasq so pihole-FTL can listen on port 53. Then Pi-Hole will work properly. From your debug log, dnsmasq is on port 53.

*** [ DIAGNOSING ]: Ports in use
*:5900 vncserver- (IPv6)
*:5900 vncserver- (IPv4)
*:22 sshd (IPv4)
*:22 sshd (IPv6)
*:80 lighttpd (IPv4)
*:80 lighttpd (IPv6)
*:53 dnsmasq (IPv4)
*:53 dnsmasq (IPv6)

*** [ DIAGNOSING ]: Pi-hole processes
[āœ“] dnsmasq daemon is active
[āœ“] lighttpd daemon is active
[āœ—] pihole-FTL daemon is inactive

@jfb Thanks for the tip, could please tell me at which point I need to stop dnsmasq?
Because I get no DNS if I disable it before installation and installation needs dns.

And it during the installation it says:
Stopping DNS service
Starting DNS service -> but this finishes with timeout and DNS service is never started (when I ran install script as user)

Then I ran installation as root, it went through but FTL does not work correctly and when I enter web admin page all graphs are just loading but does not show anything.

here is the log

Oct 09 06:24:07 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Oct 09 06:24:07 raspberrypi pihole-FTL[10586]: Not running
Oct 09 06:24:07 raspberrypi pihole-FTL[10586]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Oct 09 06:24:07 raspberrypi su[10613]: Successful su for pihole by root
Oct 09 06:24:07 raspberrypi su[10613]: + ??? root:pihole
Oct 09 06:24:07 raspberrypi su[10613]: pam_unix(su:session): session opened for user pihole by (uid=0)
Oct 09 06:24:08 raspberrypi pihole-FTL[10586]: dnsmasq: cannot open or create lease file /var/lib/misc/dnsmasq.leases: Permission denied
Oct 09 06:24:08 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
Oct 09 06:27:00 raspberrypi systemd[1]: Stopping LSB: pihole-FTL daemon...
Oct 09 06:27:00 raspberrypi pihole-FTL[10965]: Not running
Oct 09 06:27:00 raspberrypi systemd[1]: Stopped LSB: pihole-FTL daemon.
Oct 09 06:33:49 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Oct 09 06:33:49 raspberrypi pihole-FTL[11876]: Not running
Oct 09 06:33:49 raspberrypi pihole-FTL[11876]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Oct 09 06:33:49 raspberrypi su[11901]: Successful su for pihole by root
Oct 09 06:33:49 raspberrypi su[11901]: + ??? root:pihole
Oct 09 06:33:49 raspberrypi su[11901]: pam_unix(su:session): session opened for user pihole by (uid=0)
Oct 09 06:33:52 raspberrypi pihole-FTL[11876]: dnsmasq: cannot open or create lease file /var/lib/misc/dnsmasq.leases: Permission denied
Oct 09 06:33:52 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.

I tried already but it did not work and I got no DNS resolution, there must be some config file or something missing.

You will likely need root user privileges to stop dnsmasq:

sudo service dnsmasq stop
sudo service dnsmasq disable
sudo service pihole-FTL restart

This command will completely remove dnsmasq from your system (except for the one included in FTL):

sudo apt-get remove dnsmasq

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.