I install Pi-Hole on my Synology NAS

Installation of the Pi-hole image

Pi-hole Installation

Creating a shared docker-pihole folder

To create a shared folder, use your system's Control Panel. It is advisable not to use the generic "docker" folder to facilitate backups with tools like hyper-backup.

Creating the shared folder

Then add two subfolders in the docker-pihole:

  • etc-pihole
  • etc-dnsmasq.d

Subfolders

Change the ‘System’ permissions in this shared folder to avoid access and execution errors.

Modification of authorisations

Creating a project in Container Manager

Container Manager

Here is the content of the docker-compose file:

version: "3" services: pihole: Image: pihole/pihole:latest container_name: pihole hostname: pihole environment: TZ: "Europe/Paris" # WEBPASSWORD time zone: "your _mot _de _passe" # Password for DNS1 web interface: "208.67.222.222" # Primary DNS (e.g. OpenDNS) DNS2: "192.168.1.1" # Secondary DNS (e.g., your Synology router) ports: - "53:53/tcp" # DNS port in TCP - "53:53/udp" # DNS port in UDP - "8888:80/tcp" # Port for web interface volumes: - /volume1/docker-pihole/etc-pihole:/etc/pihole # Configuration folder Pi-hole - /volume1/docker-pihole/etc-dnsmasq.d:/etc/dnsmasq.d # DNS restart configuration folder: unless-stopped network_mode: bridge

Make sure you set a secure password for the web interface. Note that “192.168.1.1” is the address of my Synology router.

Launch of the project

Once the project is launched, check its creation in the log to make sure there are no problems.

Creation log

Access to the Pi-Hole administration interface

Administration interface

To access the administration interface, use the local address of your SIN, e.g. 192.168.1.2:8888. Enter the password you set in the docker-compose file to access the Pi-Hole administration screen.

Administration screen

Pi-Hole test

To test Pi-Hole, temporarily change the DNS server address in the network settings of your adapter using the IP of your NAS.

Changing the DNS server

Then visit a site with lots of ads to test the effectiveness of Pi-Hole.

Comparison with and without Pi-Hole

Use a browser like Edge in a Windows sandbox, disable all security options, purge the cache and visit the site AdBlock Tester to evaluate the effectiveness of Pi-Hole.

Result without Pi-Hole:

Without Pi-Hole

Result with Pi-Hole:

With Pi-Hole

The score increased from 39/100 to 70/100, showing a noticeable improvement.

Out of 39 requests to build the page, 14 were blocked.

Comparison with Brave Blocker

The Brave browser, with its built-in blocker, is used to compare results. In private mode, Brave blocks 12 sites or queries, scoring 96/100 without Pi-Hole.

Brave

With Pi-Hole enabled, the result remains at 96/100. By disabling Brave's shield, Pi-Hole gets 70/100, and without Pi-Hole, the score is 39/100.

Conclusion

Pi-Hole is efficient but less efficient than Brave's built-in blocker according to tests performed on adblock-tester.com. However, it remains a good complement for the local network.