Build A Private Ad Blocker Using Fedora Quadlets

Pi Zero Ad Blocker
Pi Zero Ad Blocker

Live stream set for 2026-01-24 at 14:00:00 Eastern

Ask questions in the live chat about any programming or lifestyle topic.

This livestream will be on YouTube or you can watch below.


Introduction

Learn to stop ads using a Raspberry Pi. Fedora Linux makes this setup very secure.

Getting Started with Fedora IoT

First install Fedora IoT on your small device. The Raspberry Pi Zero W works very well.

Understanding Quadlets for Containers

Quadlets are a modern way to run containers. They turn container configs into systemd services.

Prepare your Mini-PC by installing the podman package. Create a simple directory for your Quadlet files.

Configuration and Deployment

Write a basic container file for your blocker. Pi-hole or AdGuard Home are great choices.

The Quadlet file manages the network and storage. Start the service using the systemctl command.

The Quadlet Configuration Code

Create a file named adblocker.container in the systemd directory. Use the following configuration for your service.

[Unit]
Description=Private Ad Blocker Container
After=network-online.target

[Container]
Image=docker.io/adguard/adguardhome:latest
Volume=/var/lib/adguardhome:/opt/adguardhome/work:Z
Volume=/etc/adguardhome:/opt/adguardhome/conf:Z
PublishPort=53:53/tcp
PublishPort=53:53/udp
PublishPort=3000:3000/tcp
PublishPort=80:80/tcp

[Install]
WantedBy=multi-user.target default.target

[Unit]
Description=Pi-hole Rootless Container
After=network-online.target

[Container]
Image=docker.io/pihole/pihole:latest
ContainerName=pihole-rootless

# DNS Ports (Redirected to high ports for rootless)
PublishPort=5300:53/udp
PublishPort=5300:53/tcp
# Web/Admin Ports
PublishPort=8080:80/tcp
PublishPort=8443:443/tcp
# Other requested ports
PublishPort=1123:123/udp
PublishPort=1067:67/udp

# Environment Variables
Environment=TZ=America/Toronto
Environment=WEBPASSWORD=your_secure_password
Environment=DNS1=1.1.1.1

# Volume Mapping (The :Z handles Fedora's SELinux automatically)
Volume=%h/pihole/etc-pihole:/etc/pihole:Z
Volume=%h/pihole/etc-dnsmasq.d:/etc/dnsmasq.d:Z

[Service]
Restart=always

[Install]
WantedBy=default.target

Load and Start the Service

systemctl --user daemon-reload # Reload Daemon

systemctl --user start pihole.service # Start Service

systemctl --user enable pihole.service # Boot Start

# Keep Running After Logo
sudo loginctl enable-linger $USER 

Deployment and Commands

Reload the systemd daemon to recognize the new file. Start the service using the systemctl start command.

Final Network Setup

Update your router DNS to point to Pi. Every device on your network stays clean.

You now have a private ad blocking server. Quadlets ensure your blocker starts after every reboot.

📷 Screenshots

Raspberry Pi Imager
Raspberry Pi Imager Displaying Customisations To Apply

USB Ethernet Connection
Network Manager Displaying Raspberry Pi USB Ethernet

SSH Connection Test
Command Line Displaying Successful SSH Connection Attempt

Podman Desktop Pull
Podman Desktop Pulling Pi-hole Image

Podman Desktop Container
Podman Desktop Displaying Runnning Container

Pi-hole Admin Login
Web Browser Displaying Pi-hole Admin Login Page

Pi-hole DNS Settings
Web Browser Displaying Pi-hole Local DNS Settings

Podman Desktop Quadlet
Podman Desktop Displaying Quadlet File For Pi-hole

Now that you have the management tools installed you are ready to view the screencast and begin your deployment.

🎬 Live YouTube Screencast

Video Displaying The Installation And Use Of Pi-hole Via Podman Desktop And Via SSH For Raspberry Pi

Take Your Skills Further

Recommended Resources:

Disclosure: Some of the links above are referral (affiliate) links. I may earn a commission if you purchase through them - at no extra cost to you.

About Edward

Edward is a software engineer, web developer, and author dedicated to helping people achieve their personal and professional goals through actionable advice and real-world tools.

As the author of impactful books including Learning JavaScript, Learning Python, Learning PHP, Mastering Blender Python API, and fiction The Algorithmic Serpent, Edward writes with a focus on personal growth, entrepreneurship, and practical success strategies. His work is designed to guide, motivate, and empower.

In addition to writing, Edward offers professional "full-stack development," "database design," "1-on-1 tutoring," "consulting sessions,", tailored to help you take the next step. Whether you are launching a business, developing a brand, or leveling up your mindset, Edward will be there to support you.

Edward also offers online courses designed to deepen your learning and accelerate your progress. Explore the programming on languages like JavaScript, Python and PHP to find the perfect fit for your journey.

📚 Explore His Books – Visit the Book Shop to grab your copies today.
💼 Need Support? – Learn more about Services and the ways to benefit from his expertise.
🎓 Ready to Learn? – Check out his Online Courses to turn your ideas into results.

Leave a Reply

Your email address will not be published. Required fields are marked *