Browsing the FTL database


#1

If you want to look @ the content of the pihole-FTL database, this may be an option. It requires only two (2) additional files in /var/www/html (tested on pihole v4.0)

  • download Stable version phpLiteAdmin 1.9.7.1
  • extract the zip file
  • copy phpliteadmin.config.sample.php and phpliteadmin.php into /var/www/html
  • rename phpliteadmin.config.sample.php to phpliteadmin.config.php
  • edit phpliteadmin.config.php:
    change: $directory = '.'; to $directory = '/etc/pihole';
    change: $subdirectories = false; to $subdirectories = true;

browse to http://IP address of pihole/phpliteadmin.php

Inspired by this topic, you can use the search function to list the entries for a specific client, and of course, use any valid sql query you want.

Use @ your own riskā€¦

edit
here is a script that installs everything

#!/bin/bash

# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
  echo "This script must be run as root" 1>&2
  exit 1
fi

file=phpLiteAdmin_v1-9-7-1.zip
mkdir -p phpLiteAdmin
cd phpLiteAdmin
wget https://bitbucket.org/phpliteadmin/public/downloads/$file
unzip $file

file=phpliteadmin.php
sudo mv /home/pi/phpLiteAdmin/$file /var/www/html/$file
source=phpliteadmin.config.sample.php
target=phpliteadmin.config.php
sudo mv /home/pi/phpLiteAdmin/$source /var/www/html/$target

sudo sed -i "/$directory = '.';/c\$directory = '/etc/pihole';" /var/www/html/$target
sudo sed -i '/$subdirectories = false;/c\$subdirectories = true;' /var/www/html/$target

/edit