Pi-Hole : DHCP does not work

My YunoHost server

Hardware: Raspberry Pi 4
YunoHost version: 11.2.9.1
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Bonjour :slight_smile:

I installed pihole via web interface and it simply does not work.
My devices are not able to connect to my network. For instance, Android tells me “DHCP failure”.

Here are the steps I did :

  1. Install pihole via yunohost web interface
  2. Set a static IP to my yunohost server
  3. Set DNS server and enable DHCP on pihole ineterface
  4. Disable DHCP on my router (SFR)
  5. Reboot router and yunohost server

After the reboot, any of my devices were not able to connect (2 pc and android phone).
I reset my router as I was not able to connect.

I don’t know what is wrong with this installed. Everything related to the install is stock. A have not made any change to config file.

Here is some commands. I run these command on my yunohost via ssh and I am connected to my router using it’s own dhcp/dns

admin@redzic:~ $ sudo pihole status
  [âś“] FTL is listening on port 53
     [âś“] UDP (IPv4)
     [âś“] TCP (IPv4)
     [âś“] UDP (IPv6)
     [âś“] TCP (IPv6)

  [âś“] Pi-hole blocking is enabled

admin@redzic:~ $ cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1               yunohost

#127.0.0.1      xxxxxx
192.168.1.20    xxxxxxxxx.ch #Added by pihole#

admin@redzic:~ $ dig a yunohost.org +short +identify
80.67.172.144 from server ::1 in 47 ms.

admin@redzic:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1

I also tried to manually configure my devices in order to use the pi’s DNS :

jaared@localhost:~> cat /etc/resolv.conf 
# Generated by NetworkManager
#nameserver 9.9.9.9
#nameserver 192.168.1.1
nameserver 192.168.1.20

jaared@localhost:~> dig a yunohost.org +short +identify
;; communications error to 192.168.1.20#53: timed out
;; communications error to 192.168.1.20#53: timed out
;; communications error to 192.168.1.20#53: timed out

; <<>> DiG 9.18.20 <<>> a yunohost.org +short +identify
;; global options: +cmd
;; no servers could be reached


admin@redzic:~ $ yunohost service log pihole-FTL
Error: yunohost command must be run as root or with sudo.
admin@redzic:~ $ sudo !!
sudo yunohost service log pihole-FTL
[sudo] password for admin:
Sorry, try again.
[sudo] password for admin:
/var/log/pihole-FTL.log:
journalctl:
  - -- Journal begins at Fri 2023-06-16 03:00:09 CEST, ends at Thu 2024-01-04 18:02:05 CET. --
  - Jan 03 20:17:14 pihole-FTL[1438]: Not running
  - Jan 03 20:17:15 su[1477]: (to pihole) root on none
  - Jan 03 20:17:15 su[1477]: pam_unix(su:session): session opened for user pihole(uid=998) by (uid=0)
  - Jan 03 20:17:15 su[1477]: pam_unix(su:session): session closed for user pihole
  - Jan 03 20:17:15 systemd[1]: Started LSB: pihole-FTL daemon.
  - -- Boot c31b2a1a1128448fa2f7526070e517a1 --
  - Jan 03 20:23:35 systemd[1]: Stopping LSB: pihole-FTL daemon...
  - Jan 03 20:23:36 pihole-FTL[4228]: .
  - Jan 03 20:23:36 pihole-FTL[4228]: Stopped
  - Jan 03 20:23:36 systemd[1]: pihole-FTL.service: Succeeded.
  - Jan 03 20:23:36 systemd[1]: Stopped LSB: pihole-FTL daemon.
  - Jan 03 20:23:36 systemd[1]: Starting LSB: pihole-FTL daemon...
  - Jan 03 20:23:36 pihole-FTL[4267]: Not running
  - Jan 03 20:23:36 su[4283]: (to pihole) root on none
  - Jan 03 20:23:36 su[4283]: pam_unix(su:session): session opened for user pihole(uid=998) by (uid=0)
  - Jan 03 20:23:36 pihole-FTL[4288]: FTL started!
  - Jan 03 20:23:36 su[4283]: pam_unix(su:session): session closed for user pihole
  - Jan 03 20:23:36 systemd[1]: Started LSB: pihole-FTL daemon.
  - Jan 03 20:24:21 systemd[1]: Stopping LSB: pihole-FTL daemon...
  - Jan 03 20:24:22 pihole-FTL[4420]: .
  - Jan 03 20:24:22 pihole-FTL[4420]: Stopped
  - Jan 03 20:24:22 systemd[1]: pihole-FTL.service: Succeeded.
  - Jan 03 20:24:22 systemd[1]: Stopped LSB: pihole-FTL daemon.
  - Jan 03 20:24:22 systemd[1]: Starting LSB: pihole-FTL daemon...
  - Jan 03 20:24:22 pihole-FTL[4437]: Not running
  - Jan 03 20:24:22 su[4453]: (to pihole) root on none
  - Jan 03 20:24:22 su[4453]: pam_unix(su:session): session opened for user pihole(uid=998) by (uid=0)
  - Jan 03 20:24:22 pihole-FTL[4458]: FTL started!
  - Jan 03 20:24:22 su[4453]: pam_unix(su:session): session closed for user pihole
  - Jan 03 20:24:22 systemd[1]: Started LSB: pihole-FTL daemon.
  - -- Boot 7c22fcd99ce949dcb4599c850e9f2eff --
  - Jan 03 22:30:50 systemd[1]: Stopping LSB: pihole-FTL daemon...
  - Jan 03 22:30:51 pihole-FTL[9327]: .
  - Jan 03 22:30:51 pihole-FTL[9327]: Stopped
  - Jan 03 22:30:51 systemd[1]: pihole-FTL.service: Succeeded.
  - Jan 03 22:30:51 systemd[1]: Stopped LSB: pihole-FTL daemon.
  - -- Boot e48ce48a6d634a6b9351f82a499cc8fc --
  - Jan 03 23:23:05 systemd[1]: Starting LSB: pihole-FTL daemon...
  - Jan 03 23:23:05 pihole-FTL[26699]: Not running
  - Jan 03 23:23:05 su[26718]: (to pihole) root on none
  - Jan 03 23:23:05 su[26718]: pam_unix(su:session): session opened for user pihole(uid=998) by (uid=0)
  - Jan 03 23:23:07 systemd[1]: Started LSB: pihole-FTL daemon.
  - Jan 03 23:23:33 systemd[1]: Stopping LSB: pihole-FTL daemon...
  - Jan 03 23:23:34 pihole-FTL[28462]: .
  - Jan 03 23:23:34 pihole-FTL[28462]: Stopped
  - Jan 03 23:23:34 systemd[1]: pihole-FTL.service: Succeeded.
  - Jan 03 23:23:34 systemd[1]: Stopped LSB: pihole-FTL daemon.
  - Jan 03 23:23:34 systemd[1]: Starting LSB: pihole-FTL daemon...
  - Jan 03 23:23:34 pihole-FTL[28475]: Not running
  - Jan 03 23:23:34 su[28492]: (to pihole) root on none
  - Jan 03 23:23:34 su[28492]: pam_unix(su:session): session opened for user pihole(uid=998) by (uid=0)
  - Jan 03 23:23:34 su[28492]: pam_unix(su:session): session closed for user pihole
  - Jan 03 23:23:34 systemd[1]: Started LSB: pihole-FTL daemon.
admin@redzic:~ $ sudo yunohost service log dnsmasq
journalctl:
  - -- Journal begins at Fri 2023-06-16 03:00:09 CEST, ends at Thu 2024-01-04 18:02:50 CET. --
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 194.150.168.168#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 2001:910:800::12#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 2001:1608:10:25::9249:d69b#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 185.233.100.101#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 89.234.141.66#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 2a0c:e300::101#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 2001:67c:28a4::#53
  - Jan 03 22:49:27 dnsmasq[6620]: using nameserver 2a01:3a0:53:53::#53
  - Jan 03 22:49:27 dnsmasq[6620]: read /etc/hosts - 5 addresses
  - Jan 03 22:49:28 dnsmasq[6646]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
  - Jan 03 22:49:28 systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
  - Jan 03 23:00:00 systemd[1]: Stopping dnsmasq - A lightweight DHCP and caching DNS server...
  - Jan 03 23:00:00 dnsmasq[13160]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
  - Jan 03 23:00:00 dnsmasq[6620]: exiting on receipt of SIGTERM
  - Jan 03 23:00:00 systemd[1]: dnsmasq.service: Succeeded.
  - Jan 03 23:00:00 systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
  - Jan 03 23:00:00 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
  - Jan 03 23:00:00 dnsmasq[13192]: started, version 2.85 cachesize 256
  - Jan 03 23:00:00 dnsmasq[13192]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile
  - Jan 03 23:00:00 dnsmasq[13192]: warning: no addresses found for interface wlan0
  - Jan 03 23:00:00 dnsmasq[13192]: warning: no addresses found for interface wlan0
  - Jan 03 23:00:00 dnsmasq[13192]: reading /etc/resolv.dnsmasq.conf
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2a0c:e300::100#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 91.239.100.100#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 80.67.169.12#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2001:910:800::40#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 89.233.43.71#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 84.200.70.40#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2a00:5881:8100:1000::3#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 195.160.173.53#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2001:1608:10:25::1c04:b12f#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 84.200.69.80#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 185.233.100.100#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 80.67.169.40#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 194.150.168.168#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2001:910:800::12#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2001:1608:10:25::9249:d69b#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 185.233.100.101#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 89.234.141.66#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2a0c:e300::101#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2001:67c:28a4::#53
  - Jan 03 23:00:00 dnsmasq[13192]: using nameserver 2a01:3a0:53:53::#53
  - Jan 03 23:00:00 dnsmasq[13192]: read /etc/hosts - 6 addresses
  - Jan 03 23:00:01 dnsmasq[13227]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
  - Jan 03 23:00:01 systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
  - Jan 03 23:22:55 systemd[1]: Stopping dnsmasq - A lightweight DHCP and caching DNS server...
  - Jan 03 23:22:56 dnsmasq[26180]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
  - Jan 03 23:22:56 dnsmasq[13192]: exiting on receipt of SIGTERM
  - Jan 03 23:22:56 systemd[1]: dnsmasq.service: Succeeded.
  - Jan 03 23:22:56 systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
admin@redzic:~ $

Here is my Yunohost diag : https://paste.yunohost.org/raw/mubowexoki

Do you have any idea what is wrong with my install ?

Thank you.

Hello,

Did you set the modem (SFR-box) or the devices to use the Raspi as DNS ?

Hello. Thank you for your help.

I am not able to set a custom DNS in the settings of this router as this option do not exist.
SFR want us to stick on their DNS. I can only turn off/on the DHCP.

Je ne sais si ça se fait de continuer en francais un fil crée en anglais. Si cela est acceptable alors volontier pour le francais

J’ai le même soucis avec un autre opérateur.

Tu peux demander Ă  tes appareils de prendre le DNS de ton Raspi, qui leur filera au passage une IP locale.

Non justement. J’ai édité mon poste et ajouté d’autres informations.
Quand je mets l’adresse du pihole comme dns sur les autres appareils, ça ne marche pas.
(Voir dernière commande dig de mon premier post)

Hello,

j’ai le même soucis avec adguard ou avec PiHole:

J’active le DHCP de pihole, je désactive celui de ma box (bbox), je passe mon PC client en DHCP: mon PC n’obtient aucune adresse IPV4, ni mes autres clients (téléphone android, box android, Pc.

J’ai bien ouvert les ports sur le firewall de Yunohost mais rien n’y fait (67 et 68).

Je dois bien admettre que je suis un peu perdu.

Idem. Adguard me fait exactement la mĂŞme chose.
J’ai épuisé les recherches et les idées d’où la création du topic ici. Je n’ai plus aucune idée.

Mes ports sont également ouverts sur Yuno mais fermé sur la box SFR.

Je viens de tomber lĂ  dessus sur le git du package de pihole pour yunohost:

J’ai aussi ces problèmes là et dans le fil de conversation il apparait que le DHCP ne fonctionne pas…

Si quelqu’un a une idée de si c’est toujours d’actualité?

Pour faire un autre retour:

J’ai désinstallé pihole, fait un regen-conf.
J’ai réinstallé adguard, reouvert les port dhcp et ça fonctionne.

J’ai essayé de faire ça également mais ça ne donne rien.
Si je supprime Pihole, le dnsmasq tourne normalement. Dès que je l’installe, dnsmasq s’arrête et le FTL ne semble pas tourner. J’ai mis a jour le premier poste avec les logs.

Tu à ouver les ports UDP 67 et 68 tu dis, directement sur l’interface Yunohost ?

Yes, à mon avis c’est mort pour pihole.

Désinstalle le regen toute ta conf en -force.

Une fois que c’est fait installe adguard, ouvre les port dhcp en tcp et udp syr le firewall du yunohost et active le DHCP du adguard.

par contre des fois le ports disparaissent du fiorewall, je vais arrêter de bidouiller les appli et je vais voir si ça tien. :slight_smile:

Tu me dis si tu y arrives?

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