Pi-hole | Privacy settings
This article is about Privacy Settings within Pi-Hole. If you want to disable logging for certain reasons for example to save disk space on your little raspberry pi or to be complaint with any necessary privacy requirement, then is could be a interesting article for you.
FYI: Iam not gonna do a deep dive with explanations, therefore you read the official Pi-hole documentation: Pi-hole docs
An article about my Pi-hole configuration is in the pipeline and coming soon… stay tuned!
GUI Settings
At first we gonna login into our Pi-hole Webgui to select the Anonymous mode:
Settings > Privacy > Anonymous mode
Now disable query logging, in my case its already disabled, and flush logs:
SSH/CLI Settings
Well done, your’e safe now… well im just kidding. Now we have to delete the already existing log files, reconfigure the pi-hole ftl conf file and also delete the ftl db. Therefore we have to connect to our Raspberry Pi with ssh:
ssh pi@192.168.0.15 -p 22 #pi is the username followed by the ip of your pi-hole
#after connection established successfully:
cd /var/log/pihole #change directory
ls -lsha #list stuff within this folder
Within this folder you’ll see the pihole log file and also the compressed ones (later more):
This folder contains all the log files, which contain several information. Those can be also very huge in size. Here in my case it wasn’t a space problem, it was my paranoia that made me deleting all the log files… So therefore sudo rights are necessary:
Next step is to remove the long-term/query db and set up how long we want our queries to be stored:
cd /etc/pihole/ #navigate into pihole directory
sudo service pihole-FTL stop #stop the ftl service
sudo rm pihole-FTL.db #remove the db
sudo nano pihole-FTL.conf #nano is our editor
sudo service pihole-FTL start #start the ftl service
“pihole-FTL.conf” contains configuration parameters, we are gonna add MAXDBDAYS=0 as an additional line.
Afterwards you can save and exit nano with [cntrl + x] and y.
So why we had compressed log files: Because of this conf file: /etc/pihole/logrotate If you take a look into it, there is no need for further explanations:
Now we’re really done but its important to note that logging is usually useful for monitoring DNS traffic and diagnosing issues. Make sure to carefully evaluate the impact of disabling logging on your specific requirements (iam using Pi-hole in my private envireronment and i don’t need ally logging) and use cases before making this change.
Cheers!