DHCP enabled , disabled

Hi ,

before installing pi-hole i had configured a basic DHCP server .

after installing pihole , i gone to the paramaters and i activated the DHCP server built-in .
this is not working with my bridged wifi <=> lan , so i decided to desactivate the built-in pi-hole DHCP server .

and at this point , the config file is empty ...

you should save file /etc/dnsmasq.conf before modifying it ... and restaure the saved file after user desactivate the DHCP server include on pihole ...

This is a good practice for any file you modify.

Edit - you shouldn't be changing this particular file - see comment below.

Changes are made to files in /etc/dnsmasq.d and not to the main /etc/dnsmasq.conf file.

1 Like

Hello ,

the main file /etc/dnsmasq.conf is deleted and then it is set to a link to the dnsmasq.d directory …

so the /etc/dnsmasq.conf file is not as before install DHCP server …

why i tell this if it is not true . try and see please .

Regards.

Provenance : Courrier pour Windows 10

here is the new content of /etc/dnsmasq.conf :

pi@rasphomfi:/ $ cat /etc/dnsmasq.conf
conf-dir=/etc/dnsmasq.d
pi@rasphomfi:/ $

before install and / or activate pi-hole DHCP server built-in the content was :

 pi@rasphomfi:/ $ cat /etc/dnsmasq.conf
interface=br0
except-interface=wlan0
dhcp-range=192.168.1.12,192.168.1.254,255.255.255.0,24h
server=9.9.9.9
domain-needed
bogus-priv

#############
## Logging ##
#############
# For debugging purposes, log each DNS query as it passes through dnsmasq.
#log-queries

# Log lots of extra information about DHCP transactions.
#log-dhcp

# Log facility
# Définit la "facility" dans laquelle Dnsmasq enverra ses entrées syslog,
# par défaut DAEMON ou LOCAL0 si le mode debug est activé.
# Si la "facility" contient au moins un caractère "/", alors
# Dnsmasq  considère qu'il s'agit d'un fichier et enverra les logs dans
# le fichier correspondant Ă  la place du syslog.
# (Les erreurs lors de la lecture de la configuration vont toujours vers
# le syslog, mais tous les messages postérieures à un démarrage réussi
# seront exclusivement envoyés vers le fichier de logs).
# Lorsque Dnsmasq est configuré pour envoyer ses traces  vers  un
# fichier, la réception d'un signal SIGUSR2 entraine la fermeture et réouverture du fichier.
# Cela permet la rotation de fichiers de traces sans nécessiter l'arrêt de Dnsmasq.
#log-facility=/var/log/dnsmasq.log
pi@rasphomfi:/ $

/etc/dnsmasq.conf is checked prior to installation. If it is ours then it is backed up, if it is not then it is left alone.

To verify, run the installer as sudo bash -x and you can see the steps taken, you should see the text

Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!

HI ,

ok for install , but with the command pihole -r it was changed .

it is not me that edited the /etc/dnsmasq.conf file and put in :

conf-dir=/etc/dnsmasq.d

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