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

#22

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

#23

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?

#24

are those domains are blocked as wildcards, as suggested in https://adblockplus.org/filter-cheatsheet. 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?

#25

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.

#26

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

#27

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.

#28

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

Best,
V

#29

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

#30

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

#31

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

#32

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.

#33

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

#34

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

Spotifiy blocker list

#35

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!

#36

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

#37

Thanks for the catch. Corrected.

1 Like