By now you should have your pi-hole up and running with devices using it for DNS checking. At the moment, the pi-hole will be using the default block list from it’s gravity database, which for many people is enough. But if you want to block more than the basics, you need to add your own block lists

before we get to how to do this however, let’s have a quick tour of the pi-hole dashboard…

The main dashboard

pihole main dashboard

Across the top of the pihole you will see 4 coloured blocks. These show:

  • Blue – the total number of DNS queries received by the pihole from all your network devices
  • Red – The total number of those queries which the pihole has blocked from being resolved
  • Yellow – The total number of those queries block as a percentage of the overall number of queries recieved.
  • Green – The number of domains in your block lists

Below those blocks you will then see a time-line showing the activity in your network on a rolling 24hr basis – this time-line will display the number of requests received by the pihole as well as the number of requests it has blocked.

Below that you will see another timeline which displays the same data as the one above, but now it identifies which devices in your network made the DNS requests. This helps see which devices are being the most talkative.

As you move down the dashboard, you will see more statistics – the two donut charts show what type of DNS queries have been made by devices in your network, and how those DNS query requests were responded

pihole DNS query types & responses

Finally you will see four “top-10” lists of permitted and blocked domains, and the identities of those devices who make the most DNS queries along with those client which have the most DNS queries blocked.

pihole Top-10 lists

In future blogs, I will explore some of the other areas of the pihole settings, but for now, lets get back to those pesky ads…

Adding multiple entries to the block lists

One of the best things about running a pihole (aside from blocking all the ads) is the huge community of pihole aficionados on the www.

There are many people who produce great lists of dodgy-domains for you to include in your pihole.

One of the places to get such lists is the blocklistproject on github.

The Block List Project

To add a list to your pihole, simply navigate to the list of lists, select the link you want (choose the original option) and right-mouse click the link to select Copy link address.

Choosing a block list

Now navigate to the Adlists section of your pihole and in the section called Add new adlist paste the URL you just copied, add a description if you want and then click add

Adding a new block list to the pi-hole

Repeat this process with as many block lists as you want

A curated list of blocklists

Once you have added all your blocklists, you need to update the gravity database. The simplest way to do this is to navigate to the Tools menu and choose Update gravity. This will open a page with a big blue button which you need to click to run the update process.

Updating Gravity
Updating the blocklists in the gravity database

In addition to adding large lists to your pi-hole, you can block sites on a domain by domain basis.

To do this, navigate to the Domains section of the menu and enter the domain name you wish to block in the field at the top of the page. You can add a description to this if you wish. You then need to click the option to Add to blacklist

Adding a specific domain to the block list

Blocking domains with regular expressions

Another way to add specific entries to the block list is via the use of RegEx statements.

For those not familiar with Regular expressions, a RegEx statement is a string of characters that represent a pattern of characters a system will look for and then carry out some form of operation if that pattern is found.

I don’t have the space to delve into RegEx fully here, but for those who might be interested in how to build and use Regular expressions, a great primer for RegEx can be found here

As a quick example, however if we take the following RegEx statement:

^adtrack(er|ing)?[0-9]*[_.-]

This will instruct the pihole to block and URL which contains the words adtracker or adtracking followed by any numeral from 0 to 9 followed by either an underscore, a dot, or a hyphen

e.g. adtracker012341.fakedomain.com

(almost) Live blocking of domains

Another awesome feature of the pihole is for you to see a recent stream of DNS queries in your network and then on-the-fly add them to your list of blocked domains.

To do this, navigate to the Query log of the pihole where you will see a list of the last 100 queries received by the pihole.

Look through the list to identify any domains you want to block and then simply click the Blacklist option at the right-hand side of the line with the domain.

Blocking domains via the query log

If you make a mistake, you can return to the Domain section of the dashboard to delete the entry from the block list

Click the checkbox at the side of the entry you wish to remove and then click the bin icon at the top of the section to remove the entry.

Removing an entry from the Domain block list

In the next installment of this blog series, I will take a look at how you can fine tune which devices can access certain online content and which ones cannot with the use of Groups and custom blocklists

See you soon!