after pihole -r DNS service not running and FTL offline
Output:
[i] Existing PHP installation detected : PHP version 7.0.30-0+deb9u1
[i] Repair option selected
[â] Disk space check
[â] Update local cache of available packages
[â] Checking apt-get for upgraded packages... 7 updates available
[i] It is recommended to update your OS after installing the Pi-hole!
[i] Installer Dependency checks...
[â] Checking for apt-utils
[â] Checking for dialog
[â] Checking for debconf
[â] Checking for dhcpcd5
[â] Checking for git
[â] Checking for iproute2
[â] Checking for whiptail
[i] Performing reconfiguration, skipping download of local repos
[â] Resetting repository within /etc/.pihole...
[â] Resetting repository within /var/www/html/admin...
[i] Main Dependency checks...
[â] Checking for bc
[â] Checking for cron
[â] Checking for curl
[â] Checking for dnsutils
[â] Checking for iputils-ping
[â] Checking for lsof
[â] Checking for netcat
[â] Checking for psmisc
[â] Checking for sudo
[â] Checking for unzip
[â] Checking for wget
[â] Checking for idn2
[â] Checking for sqlite3
[â] Checking for libcap2-bin
[â] Checking for dns-root-data
[â] Checking for resolvconf
[â] Checking for lighttpd
[â] Checking for php7.0-common
[â] Checking for php7.0-cgi
[â] Checking for php7.0-sqlite3
[â] Enabling lighttpd service to start on reboot
[â] Installing scripts from /etc/.pihole
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[â] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
[i] Installing blocking page...
[â] Creating directory for blocking page, and copying files
[â] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up
[â] Installing sudoer file
[â] Installing latest Cron script
[â] Installing latest logrotate script
[i] FTL Checks...
[â] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary...
[â] Downloading and Installing FTL
[i] FTL can now resolve DNS Queries without dnsmasq running separately
[â] Stopping dnsmasq service...
[â] Disabling dnsmasq service
[â] man pages installed and database updated
[i] Systemd-resolved is not enabled
[â] Starting lighttpd service
[â] Enabling lighttpd service to start on reboot
[i] Restarting services...
[â] Starting pihole-FTL service
[â] Enabling pihole-FTL service to start on reboot
[â] Deleting existing list cache
[â] DNS service is not running
[â] Starting DNS service
[â] DNS resolution is not available
All the steps are done.
Unfortunately FTL is still offline
sudo systemctl status pihole-FTL -l ● pihole-FTL.service - LSB: pihole-FTL daemon Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled) Active: active (exited) since Thu 2018-08-23 22:31:32 CEST; 12min ago Docs: man:systemd-sysv-generator(8) Process: 437 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS) CGroup: /system.slice/pihole-FTL.service
Aug 23 22:31:28 matrix-revolutions systemd[1]: Starting LSB: pihole-FTL daemon... Aug 23 22:31:28 matrix-revolutions pihole-FTL[437]: Not running Aug 23 22:31:29 matrix-revolutions pihole-FTL[437]: chown: Zugriff auf '/etc/pihole/dhcp.leases' nicht möglich: Datei Aug 23 22:31:29 matrix-revolutions pihole-FTL[437]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a Aug 23 22:31:29 matrix-revolutions su[569]: Successful su for pihole by root Aug 23 22:31:29 matrix-revolutions su[569]: + ??? root:pihole Aug 23 22:31:29 matrix-revolutions su[569]: pam_unix(su:session): session opened for user pihole by (uid=0) Aug 23 22:31:32 matrix-revolutions pihole-FTL[437]: dnsmasq: failed to bind DHCP server socket: Address already in us Aug 23 22:31:32 matrix-revolutions systemd[1]: Started LSB: pihole-FTL daemon.
First get ride of above setting as it doesnt belong to Pi-hole and might conflict with other Pi-hole settings.
Edit the file /etc/dnsmasq.conf and remove or hash out the dhcp-range= line.
Restart FTL and check again:
sudo systemctl restart pihole-FTL
sudo systemctl status pihole-FTL -l
Next setup the routers DHCP server settings like described on below FAQ (methode 1 or 2):
Or if settings lacking or not exposed on the router, configure Pi-hole to do DHCP for your network instead of the router:
Testing DNS resolution and blocking can be done with below one on one of your client PC's (Linux, Windows or Mac):
nslookup pi.hole <PIHOLE_IP_ADDRESS>
Below an example from one of my clients with 10.0.0.2 being my Pi-hole IP:
Solved by new installation of Stretch, RasAP and Pihole with additional following commands:
pihole -r #Repair
sudo touch /var/lib/misc/dnsmasq.leases
sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases
reboot