[SOLVED] Pihole + Network Manager configuration

Please follow the below template, it will help us to help you!

Actual Behaviour:

Dns service not running
FTL is offiline

Hello.

I used pihole with raspbian jessy and it worked very well.

Now I’m on Raspbian Stretch, RPI 3B+.
Recently i have installed Strech with NetworkManager but since pihole never work.

here is my configuration :

**/etc/NetworkManager/NetworkManager.conf**
[main]
plugins=ifupdown,keyfile
#dns=dnsmasq
[ifupdown]
managed=false

**/etc/resolv.conf**
nameserver 127.0.0.1

**/etc/dnsmasq.conf**
listen-address=127.0.0.1

**ls /etc/NetworkManager/dnsmasq.d/**
_cache.conf_

**sudo service pihole-FTL status**
_● pihole-FTL.service - LSB: pihole-FTL daemon_
_   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)_
_   Active: active (exited) since Tue 2018-09-25 22:15:49 CEST; 7min ago_
_     Docs: man:systemd-sysv-generator(8)_
_   CGroup: /system.slice/pihole-FTL.service_

_sept. 25 22:15:48 rasp systemd[1]: Starting LSB: pihole-FTL daemon..._
_sept. 25 22:15:48 rasp pihole-FTL[2564]: Not running_
_sept. 25 22:15:48 rasp pihole-FTL[2564]: Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)_
_sept. 25 22:15:48 rasp pihole-FTL[2564]: The value of the capability argument is not permitted for a file. Or the file is not a regular (non-s_
_sept. 25 22:15:48 rasp su[2587]: Successful su for pihole by root_
_sept. 25 22:15:48 rasp su[2587]: + ??? root:pihole_
_sept. 25 22:15:48 rasp su[2587]: pam_unix(su:session): session opened for user pihole by (uid=0)_
_sept. 25 22:15:49 rasp pihole-FTL[2564]: dnsmasq: failed to create listening socket for port 53: Permission denied_
_sept. 25 22:15:49 rasp systemd[1]: Started LSB: pihole-FTL daemon._

 **sudo service dnsmasq status**
_● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server_
_   Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled)_
_   Active: inactive (dead)_

EDIT: after a rebootI have to run the command sudo service dnsmasq start.
And finally DNS is active on pihole web interface but FTL is offline

how to configure and start automatic dnsmasq at startup and fix FTL ?

Thanks for your help
Boyboy frenchman

Debug Token:

0le4kqx4a5

For information

piboy@rasp:~ $ file /usr/bin/pihole-FTL
/usr/bin/pihole-FTL: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=5864a2037d20fbf1a54d3ee377c9ebbc0b7400da, not stripped

piboy@rasp:~ $ dpkg --print-architecture
armhf

piboy@rasp:~ $ uname -a
Linux rasp 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l GNU/Linux

Your debug log shows dnsmasq running on port 53, and pihole-FTL not running.

*** [ DIAGNOSING ]: Ports in use
...
*: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 active

Why are you manually starting dnsmasq? pihole-FTL contains the required dnsmasq code (new to Pi-Hole V 4.0), so dnsmasq should not be running as a separate process.

Hello,
so i do sudo service dnsmasq stop and reboot. Then DNS is running correctly.

piboy@rasp:~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date

[βœ“] Everything is up to date!

a new debug show :

76hc9fmbcs

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[βœ“] mkt354.com is 74.112.69.45 via localhost (127.0.0.1)
[βœ—] Failed to resolve mkt354.com via Pi-hole (192.168.0.40)
[βœ“] doubleclick.com is 172.217.22.142 via a remote, public DNS server (8.8.8.8)

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

I turn around...

I explore a track :

sudo systemctl stop dnsmasq
sudo systemctl disable dnsmasq
reboot

sudo systemctl status pihole-FTL -l

sept. 26 15:24:05 rasp pihole-FTL[2385]: dnsmasq: failed to create listening socket for port 53: Permission denied

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'

Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2317/lighttpd
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1689/dnsmasq
tcp6 0 0 :::80 :::* LISTEN 2317/lighttpd
udp 0 0 127.0.0.1:53 0.0.0.0:* 1689/dnsmasq

sudo skill 1689
sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'

Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2317/lighttpd
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3159/dnsmasq
tcp6 0 0 :::80 :::* LISTEN 2317/lighttpd
udp 0 0 127.0.0.1:53 0.0.0.0:* 3159/dnsmasq

dnsmasq is already running...
Is this normal ?
and FTL on webinterface is offline

Not sure if I am missing something....
You should not run dnsmasq anymore.
Latest Pihole-FTL has dnsmasq "build in" An update to latest version would have disabled DNSmasq for you during update
Disable dnsmasq during boot should fix your issue. As you start the old dnsmasq before the Pihole-ftl service, port 53 is in use.

Try a re-install off pihole.

That should stop dnsmasq from starting at boot.

pi@noads:~ $ whereis dnsmasq
dnsmasq: /usr/sbin/dnsmasq /etc/dnsmasq.conf /etc/dnsmasq.d /usr/share/dnsmasq /usr/share/man/man8/dnsmasq.8.gz

pi@noads:~ $ dpkg -S /usr/sbin/dnsmasq
dnsmasq-base: /usr/sbin/dnsmasq

But if it still does start, try remove the package as you wont need it anymore:

sudo apt-get remove dnsmasq-base

Maybe need to run repair after:

pihole -r

1 Like

Hello

I have the same thing as you
But after sudo apt-get remove dnsmasq-base and reboot`
DNS service is not running
FTL is offline

sudo service pihole-FTL status -l

?

piboy@rasp:~ $ sudo service pihole-FTL status -l

● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: active (exited) since Wed 2018-09-26 21:16:07 CEST; 9min ago
Docs: man:systemd-sysv-generator(8)

sept. 26 21:16:07 rasp systemd[1]: Starting LSB: pihole-FTL daemon...
sept. 26 21:16:07 rasp pihole-FTL[1881]: Not running
sept. 26 21:16:07 rasp pihole-FTL[1881]: Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)
sept. 26 21:16:07 rasp pihole-FTL[1881]: The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
sept. 26 21:16:07 rasp su[1904]: Successful su for pihole by root
sept. 26 21:16:07 rasp su[1904]: + ??? root:pihole
sept. 26 21:16:07 rasp su[1904]: pam_unix(su:session): session opened for user pihole by (uid=0)
sept. 26 21:16:07 rasp pihole-FTL[1881]: dnsmasq: failed to create listening socket for port 53: Permission denied
sept. 26 21:16:07 rasp systemd[1]: Started LSB: pihole-FTL daemon.

1 Like

I understand the article but I do not understand the solution that is proposed

Solution is in this post by @DL6ER:

Edit the file as proposed with for example nano:

sudo nano /etc/init.d/pihole-FTL

OMG
thats all right !!

I tested this a few days ago but it did not work, maybe because of dnsmasq ...

This to fix the problem and everything is working properly

thanks to you

1 Like

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