Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Website / Blog / Download: Run 'pihole -up'

 

Pi-hole v5.0 is here!

After a successful beta testing and development period (many thanks to the beta testers!), we are pleased to announce the release of 5.0 for general availability!

 

Important notice

There are many fundamental changes between Pi-hole 4.x and 5.0 – as such, this is strictly a one way operation. Once you move from 4.x to 5.0, there is no way to go back; you will need to restore from a backup. Read all the notes before you make the jump, and make a backup!

 

What’s new?

Quite a lot, actually, but we’ll go over the bigger things briefly here.

 

Per-client blocking

This is something that users have been asking for for a long time, and we are proud to be finally able to offer this awesome feature. Groups can be created and block lists, blacklist, and whitelist can be applied to groups. Blocklists, blacklist and whitelist can all be individually enabled/disabled.

 

To support this new functionality, we migrated the list storage from individual files in /etc/pihole to a new gravity database in the same directory. This allows control over enabling and disabling items in the lists, and even the ability to add comments to remind you why you black/whitelisted something! Furthermore, the database will store when you initially added a domain and when you last changed it (or disabled it). You may notice that updating gravity (pihole -g) takes a little longer to run than previously, however this process normally happens in the background once a week in the early morning hours and should not disrupt your DNS service. The longer run time comes due to generating an efficient B-tree index that allows fast lookups in the database.

 

We added a dashboard interface (Group Management) to be able to easily use this powerful new functionality, however, there is currently no CLI interface through the pihole command. If you want to manage groups from the CLI, you’ll have to directly interact with the database. We prepared an extensive example in our official documentation showing some possible configurations once through the web interface but also how to achieve the same thing through the CLI.

 

Custom user scripts that rely on manipulating files such as gravity.list,black.list,whitelist.txt etc. will need to be changed to interacting with the database. There is so much power in this new database, it’s worth it! And, we’re here to help, just open a discussion on our Discourse platform and we can assist with advice on how to use the new gravity database for your custom scripts. The bonus is that you will learn how to interact with a database system that is also heavily used in widespread applications such as Android (yes, the smartphone operating system!), Google’s Chrome, Firefox, many content management systems, and a lot more. You can even add this to your CV for your next letter of application, if you like.

 

Deep CNAME inspection

This has been a covered in a broadly discussed feature request for the ability to deeply analyze CNAME queries. This will allow Pi-hole to find whether any domain in the CNAME chain is known to be blocked. If one is found, Pi-hole can now block the original query. The feature defaults to being enabled but can be disabled with an FTL config option (CNAME_DEEP_INSPECT=false). Note that if you explicitly whitelist a domain, the domain will be retrieved regardless of whether the CNAME trail leads to a blocked domain (whitelist always takes precedence).

 

Continues...

 

Dashboard.png

 

Groups-1.png

  • Thanks 3
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...