Load Blacklist from network drive, set QueryLog to "ALL"

Hello everyone

Heard of pi-hole in the german c't magazine about 2 weeks ago and ordered a new Raspberry Pi 3B+ set with power supply, case, HDMI cable and heatsinks for the chips. Everything is up and running, pi-hole works fine. However I have two questtions:

  1. I have a NAS within my network where I habe stored a own blocklist hosts-file. At the moment this list will be uploaded with a batch file to a web server, so pi-hole can find and use it - that works fine. Now i just want to remove that unnessesary way and let pi-hole load the list from the NAS. The NAS share is already mounted to the Rasberry via fstab and I can access it from the SSH shell of the Pi. But whatever URL I use: I was not able to get pi-hole load the Blocklist directly from the mounted share (/mnt/nas/...). Is there some kind of trick? One possible solution might be to install apache onto the Pi or the NAS, but that would be overkill as a workaround.

  2. The second thing that nags me is, that the web interface shows only 10 queries of the QueryLog by default - on every reload of the page I set this to "All". Is there any way to preconfigure this to "All"?

Thank you very much :slight_smile:

You would need to edit the /etc/pihole/adlists.list and create an entry to your adblock file: file:///mnt/nas/FILENAME

Save the list and update either via the admin interface or pihole -g

You will see that the "local file" was retrieved and parsed.

It's defaulting to that setting because it's a lot faster to load 10 queries at a time (where as loading all, could take a little bit of time (cause hangs and unresponsiveness if you have thousands of queries).

Thanks for the response. Unfortunately that does not work. I tried the file URL already, but did it again now:

The file is accessible and works if loaded from a webserver.

And about the second thing: I don't care really if the Pi get's busy since this is a private network with approx. 30 clients maximum and it's a powerful Pi 3B+.

Can you access the HOSTS.txt (cat the file) from your console as pi?

Is there an output when running cat /mnt/nas/sicherung/HOSTS/HOSTS.txt ?

File might have inherited permissions from the NAS and might not allow access under pihole user

See second screenshot - yes, it's accessible. The share is mounted with the credentials the NAS expects :slight_smile:

change entry to file:///mnt/nas/sicherung/HOSTS/HOSTS.txt

you are missing a / :slight_smile:

Hmm, we may be able to add this, but I vaguely recall that there was a Javascript problem when I stopped working on this about one and a half years ago... It may be time to look into this again.

:this:

file:// is the protocol, just as https://, ftl://, etc. and /mnt/nas/sicherung/HOSTS/HOSTS.txt is the file name, summing up to three / in total:

file:///mnt/nas/sicherung/HOSTS/HOSTS.txt

That was it! Thank you very much. Had a variant with 4 slashes, but not three. List does not appear in the web interface, but it is loaded and should work though :slight_smile:

Thanks if you work on that second problem again :slight_smile:

1 Like

2 posts were split to a new topic: Raspberry Pi 3B+ temperatures

I would much like the option to change this default. I rarely look at 10, I usually look at 100 or all. A configuration option to change this default would be very nice.

DL6ER implemented that in the pull request above :slight_smile:

1 Like