Pi-hole is a powerful network-level advertisement blocker that uses DNS to filter unwanted traffic. This guide will show you how to set up Pi-hole on your Synology NAS using Docker, enabling network-wide ad blocking for all your devices.

What is Pi-hole?

Pi-hole is a network-level advertisement blocker that uses DNS to kill unsavory traffic. The main benefit of it being at this level, rather than the application level, is the ability to enable advertisement blocking for your whole network. Pi-hole will block ads for anyone and all devices without having to fiddle with your devices.

Prerequisites

Before you begin, ensure you have:

  • A Synology NAS that supports Docker
  • Network access to your Synology NAS
  • Basic understanding of Docker and networking

Installation Steps

The following steps detail how to enable pi-hole advertisement filtering for your local network.

1. Install Docker on Synology NAS

First, install Docker on your Synology NAS if you haven’t already. You can find Docker in the Package Center.

2. Create Pi-hole Container

  1. Open Docker on your Synology NAS
  2. Create a new container
  3. It is recommended to pin to a version to avoid update issues but use 4.2.2 or later
  4. Launch the container with these options then wait for it to load completely

3. Configure Pi-hole

  1. Open the Log for the container and find the password on the line that contains Assigning random password:

  2. Access the Pi-hole web interface:

    • Visit this URL replacing the IP Address with your Synology IP Address:
    http://:8181/admin

4. Verify Installation

Test that your pi-hole is listening to DNS queries by running one of these commands.

For Unix systems:

dig google.com @192.168.1.1 | grep 'ANSWER: 1'

For Windows:

nslookup google.com

If you get an answer then you’re good to go.

5. Configure DNS Settings

Set the IP address of your DNS server on your router or on a client by client basis.

Advanced Configuration

Once you’re done with the basic setup, you might want to explore these advanced features:

Benefits of Network-Level Ad Blocking

  • Protects all devices on your network
  • No need to install browser extensions
  • Works with mobile devices and smart TVs
  • Reduces bandwidth usage
  • Improves network performance

Troubleshooting

If you encounter issues:

  1. Check Docker container logs
  2. Verify DNS settings
  3. Ensure proper network connectivity
  4. Check firewall settings

Further Reading