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

This is how we learn!

2 Likes

Which formats are accepted for the content of additional lists? I quickly glanced over the current lists, and it seems that comment lines starting with # are ok; lines containing one hostname each are ok; and lines in the format 127.0.0.1 hostname are ok.

Would lines in the format of 0.0.0.0 hostname_1 hostname_2 hostname_3 work for automatic parsing? That is how my iOS host file looks like (to stay under the iOS size limit).

That format won't work, but you could write a script to convert it.

I suggest also adding this list: http://phishing.mailscanner.info/phishing.bad.sites.conf
Read about its origin here: http://phishing.mailscanner.info/

And some more lists: Free Blocklists of Suspected Malicious IPs and URLs

Also with a free account at: https://www.malwarepatrol.net/ you get a receipt # which helps you get a dansguardian feed which works with gravity: https://lists.malwarepatrol.net/cgi/getfile?receipt=???&product=8&list=dansguardian just replace the "???" with your receipt #.

Hi There,

I am new to respbarry pi and need help for some basic operation. I am getting access denied message so please let me know how i can fixed this. i have logged in with user pi

Hi

Is it possible for someone to write step-by-step instructions how to enable the unused lists?

Is ti possible to do any of this from the web interface?

Which is a copy of what is in the OP of this thread! :joy::joy:

...Which is NOT step-by-step instructions, at least not to one new to Linux.

It rather clearly states the step-by-step instructions in the header:

#  To make changes to this file:                                               #
#    1. run `cp /etc/pihole/adlists.default /etc/pihole/adlists.list`          #
#    2. run `nano /etc/pihole/adlists.list`                                    #
#    3. Uncomment or comment any of the below lists

The only thing I can think of that might be confusing is commenting or uncommenting, which is simply adding or removing the # symbol at the start of a line.

Thanks Mcat12 but like I said, no experience with Linux.

Run the commands where?
Through the web interface?
I installed the barebones Raspian and when I switch my monitor to the Pi there's no video signal.

You got far enough to be able to install pi-hole, I presume?

In an SSH session

Not yet, but it is something we are working on.

Hmmm, you should still get a login prompt, so that you can access the CLI.

I've updated the OP to make it a bit clearer on how to edit the file.

Hi PromoFaux

Thanks for your patient reply.
Your answer got me started but I had to look up "SSH into your raspberry pi"... you cannot underestimate how noob one can be.

It would help a lot of first timers, if you could add to the instructions what I eventually figured out:

Type: sudo raspi-config
Select option: 5
Hit: Enter
Select option: P2
Hit: Enter
Select: Enable ssh server.
Hit: OK, to accept and reboot.

I also got Putty installed on my PC to avoid restarting the Pi just to get an active video output.

However I'm getting this:
cp: cannot create regular file ‘/etc/pihole/adlists.list’: Permission denied

Try prefacing your commands with sudo which will elevate your privelages.

It's possible that we could get a lot more detailed with what needs to be done, but opening an SSH session, and basic file manipulation are probably outside of the scope of the project, and there already plenty of guides out there!

What we are looking to do in future is put as much into the web interface as possible to make it n00b-proof (though even then, I suspect some will struggle :slight_smile: )

1 Like

Hi PromoFaux

Thanks for another patient reply.

Sudo helped and I got to the nano interface.
I'm interested in enabling the 5 safe lists. Will I find the instructions in the link you provided?

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.