How do I add additional block lists to Pi-hole?

once you have created adlists.list

In your ssh session use the following commands

sudo nano /etc/pihole/adlists.list

'once that opens you are in a text editor like interface and any of the http links that you remove the # in front of will be picked up by the gravity script that pulls all the domains in and makes pihole work

once you are happy with your edits press CTRL+X then y then ENTER
this saves the list

then once all of that is done use the command pihole -g

Thanks technicalpyro

I did get to that stage and I can see that the 5 lists considered safe are already without a #. Am I to assume they have been enabled, then?

are those domains are blocked as wildcards, as suggested in Adblock Plus filters explained. For me its not 100% clear if wildcard blacklisting/whitelisting of the adblock scheme is respected in the pihole scripts? If not, may I ask, why?

Because we can't know in advance if the list of domains are supposed to be wildcard or they are direct domains. The function is a general function to strip out the regex and that's about it. We don't have the logic to determine the source of the list or if the user just pasted the list in to a txt file so it's hard to find out what the source is and then determine if the domains should be wildcarded or added plain.

But there seems to be an explicit switch, dependent on the file header here, isn't it ? And then the adblock grammar is used.

I thought that got reverted in a later commit. Since that is still in the code, then yes I concur that the domains should be wildcard as per the adblock link.

Just created a list for blocking spotify ads specifically. hope this helps anyone trying to block the ads on spotify as a normal user.

https://github.com/vincentkenny01/spotblock/blob/master/file1

Best,
V

The "type" of the file doesn't matter for unix - anything is a file. the content is more important.

if it doesnt exist yet, create /etc/pihole/blacklist.txt

touch /etc/pihole/blacklist.txt

Regards,
free crunchyroll premium

then echo the content of your file (given the entries are separated by linebreaks) into the newly created file.

in one step:

touch /etc/pihole/blacklist.txt && echo "$(< yourfile.txt)" > /etc/pihole/blacklist.txt

alternatively, just

cp $yourfile /etc/pihole/blacklist.txt

Could a piece of software such as ParseRat be used in this scenario to automatically parse the data we are looking for?

How does one actually add the lists to Pi-hole? I see oodles of links for lists but how are they added?

From the Web admin GUI > settings > blocklists. Enter one (or more in the same block if separated by line breaks) URL for a public blocklist in the box near the bottom, then after you have entered the last one, click on "save and update" and gravity will be rebuilt to include your new lists.

Great! Thank you very much. I guess I might have eventually found it.

Try this list Maybe update the Pi-hole device.
https://ncloud.zaclys.com/index.php/s/gwb95DL8sbTcJmx/download

Spotifiy blocker list

Fantastic thread!!!
Can somebody tell me the best way to ID ad servers that slip by?
I get adding new lists to the adlist.lists; but scalpel vs sledge hammer...
or is finding the slippery servers, then including that list a better idea?
Thanks!

There is a typo in this line, it says Image instead of imagine. Thanks for this awesome guide guys, I'm learning a lot.

Thanks for the catch. Corrected.

1 Like

15 posts were split to a new topic: How to add blocklists - V5 and later

Where is that GUI screen in the interface mentioned in the update? "As of v 3.0 .. Pi-Hole's Block Lists"??? Seeing a screenshot doesn't tell you where to navigate to find the checklist!!

Whelp, we need to update this page again. , Settings -> adlists:

http://pi.hole/admin/settings.php?tab=adlists

But, that now links to the new page, here:

http://pi.hole/admin/groups-adlists.php

1 Like

Thanks for the immediate quick response!

1 Like