OPEN SOURCE DNS FILTERING

Your network.
Your rules.

A free, open source DNS filter that blocks unwanted domains across your network. Self-host it, understand your DNS traffic, and set rules for each device.

Free to deploy, use, and extend. AGPL-3.0 licensed.

Built in Rust.
Made to run on your hardware.
Your DNS Deny dashboard

YOUR NETWORK, AT A GLANCE

Overview

Protection active
Total queries48,219
Blocked queries9,681
Block rate20.1%

Queries over time

Total Blocked

Recent queries

Illustrative query log with sample domains and verdicts
DomainTypeStatus
metrics.exampleABlocked
docs.rust-lang.orgAAllowed
ads.exampleAAAABlocked
nas.home.arpaAAllowed

PRODUCT PREVIEW Illustrative dashboard with sample data.
Self-hosted by design Rules you can change Source you can inspectFREE SOFTWARE AGPL-3.0

01 / A SMALL CHANGE AT THE SOURCE

One DNS service.
A say in every lookup.

Point your router or individual devices at DNS Deny. It checks requested domains against your rules before asking an upstream resolver for an answer.

Your devices

Laptop. Phone. TV.
Devices using your DNS.

DNS Deny

Your blocklists.
Your device policies.

RUNNING ON YOUR HARDWARE

Allowed

Resolved by your chosen upstream.

Blocked

The unwanted lookup stops here.

DNS filtering works at the domain level. It cannot remove every ad or control devices that bypass your DNS.

02 / CONTROL YOU CAN ACTUALLY USE

Less guesswork.
More say.

See the requests. Adjust the rules.
Keep your network working the way you want.

01

Make the blocklist your own.

Import DNS-compatible Adblock rules, hosts files, or plain domain lists. Contextual browser and cosmetic rules are skipped. Organize subscriptions into categories with automatic 6-field cron refreshes, write custom domain and regex rules, and let explicit allow rules handle essential exceptions.

ads.example DENY docs.example ALLOW /.*-telemetry\..*/ REGEX
02

Know what’s asking to connect.

Stream real-time lookups with the live query feed. Inspect query verdicts, response times, client IPs, and upstream activity. Queries are logged asynchronously to local SQLite with configurable retention days and one-click CSV export.

Live query feed Async SQLite history CSV export
03

Different devices. Different rules.

Assign friendly aliases to devices by IP and MAC address. Configure time-of-day and day-of-week schedules for bedtimes or focus hours, set per-device policies, or pause network-wide protection temporarily with a single tap.

Kids Tablet (Bedtime 20:00–07:00) Work Laptop Pause 1h
04

Service blocking & SafeSearch.

Toggle one-click blocks for popular streaming, social media, and gaming platforms, or group custom wildcards. Enforce strict SafeSearch rewrites on Google, Bing, YouTube, and DuckDuckGo, and catch threats with automated sinkhole discovery.

SafeSearch Enforced Social & Video Toggles Sinkhole Auto-Block
05

Encrypted upstreams & DNSSEC.

Forward outbound lookups over DNS-over-TLS (DoT) or DNS-over-HTTPS (DoH) with strict TLS SNI verification. DoT and DoH encrypt traffic between DNS Deny and your upstream resolver. Optional local DNSSEC validation checks signed DNS data for authenticity and integrity; it does not encrypt queries or authenticate unsigned zones.

DoT (853) DoH (443) DNSSEC Validation Strict SNI
06

Local records & homelab routing.

Map internal infrastructure with custom local A, AAAA, and CNAME records so your home lab, NAS, and smart devices have clean names like nas.home.arpa. Configured local names are answered locally and excluded from threat discovery. External CNAME targets are resolved separately.

nas.home.arpa A → 192.168.1.100media.lan CNAMEiot.home AAAA
07

Two cache layers. Less repeated work.

An in-memory L1 cache and weighted L2 cache reuse answers until their DNS TTL expires. Negative answers are cached too. Required policy and threat checks still apply to repeat queries.

In-memory L1 / L2 cache Negative TTL SOA Per-IP rate limits
08

Dashboard, REST API & modular builds.

Manage your resolver through the responsive, server-rendered dark dashboard or automate everything with the authenticated /api/v1/* JSON REST API. Modular Cargo build flags let you compile full, UI-only, API-only, or resolver-only binaries.

Server-Rendered UI Bearer Token REST API Zero Telemetry

COMPLETE APP FUNCTIONALITY

Everything built in. Nothing held back.

Every feature runs locally on your machine with zero external accounts, third-party trackers, or cloud subscriptions.

DNS Engine & Performance

  • UDP & TCP listener: Standard ports (53) or custom unprivileged ports (1053)
  • Two-tier caching: In-memory L1 cache and weighted L2 memory budget
  • Negative TTL fallback: Intelligent SOA minimum handling prevents redundant upstream queries
  • Per-IP rate limiting: Sliding-window queries-per-second quotas protect against abuse
  • Subnet access control: Configurable client CIDR allowlists restrict listening interface access

Rule Engine & Formats

  • DNS blocklist formats: DNS-compatible Adblock rules, standard hosts files, and plain domain lists
  • Categorized blocklists: Group sources into categories with 6-field cron auto-refresh
  • Subdomain & regex matching: High-speed regex engines match complex patterns and subdomains
  • Priority allowlists: Explicit whitelist rules reliably override blocklist subscriptions
  • Sinkhole & IP defense: Upstream sinkhole auto-discovery and administrator malicious IP lists

Encrypted DNS & Security

  • Encrypted upstreams: DNS-over-TLS (DoT, port 853) and DNS-over-HTTPS (DoH, port 443)
  • Strict TLS SNI: Upstream server name indication verification prevents impersonation
  • Local DNSSEC validation: Verify signed DNS data locally; reject invalid signatures
  • Custom DoH resolver: Dedicated DoH client with strict failover and plaintext fallback controls
  • Iterative resolver mode: Direct root nameserver recursion without intermediary forwarding

Device Policies & Schedules

  • Client identification: Granular tracking by client IP address or hardware MAC address
  • Friendly client aliases: Assign recognizable names to laptops, TVs, phones, and IoT gear
  • Automated schedules: Day-of-week and time-window rules for bedtimes, school, or work hours
  • Temporary protection pause: 1-click timer pause (5m to 48h) network-wide or per-device
  • Per-device policy overrides: Isolate guest networks or homelab servers from standard blocking

Content & Homelab Controls

  • One-click service blocking: Built-in toggles for social networks, streaming, and gaming
  • Custom service groups: Define wildcard domain bundles for targeted app restrictions
  • SafeSearch enforcement: Transparent DNS rewrites for Google, Bing, YouTube, and DuckDuckGo
  • Local DNS records: A, AAAA, and CNAME records for homelab apps (nas.home.arpa)
  • Split-horizon resolution: Configured local names stay local; external CNAME targets resolve separately

Observability & API

  • Real-time livetail: Streaming live query feed with verdict status and response metrics
  • SQLite query logs: Asynchronous, non-blocking query storage with configurable retention
  • Instant search & filters: Filter by domain, client IP, record type, or allowed/blocked status
  • Full CSV data export: Export query history directly from the dashboard for auditing
  • JSON REST API: Complete /api/v1/* endpoints authenticated with Bearer tokens

03 / FREE SOFTWARE, REAL OWNERSHIP

Your infrastructure.
Your copy of the code.

DNS Deny is free to deploy, use, and extend under the GNU Affero General Public License v3. Run it for your home, your lab, or your own project.

Read the full license
THE SOFTWAREAGPL-3.0

$0license fee

  • Deploy on your own infrastructure
  • Inspect, modify, and extend the source
  • Share under the license’s terms

You provide the hardware and hosting. Read the AGPL terms when modifying or sharing the software.

04 / PUT IT ON YOUR NETWORK

A home for your DNS.
On a machine you own.

Choose AMD64, ARM64, or the original Pi Zero. Install a Debian package, build an executable, or use Docker Compose. Set a unique admin password. Local HTTP works by default; HTTPS enforcement is configurable.

Choose your installation

AMD64 · ARM64 · Pi Zero
Debian packages · Single binary · Docker
You manage the server, updates, and network configuration.

Start from the source
git clone https://github.com/dre-zouhair/dns-deny.git
cd dns-deny

# Set your admin password in deploy/config.toml first.
docker compose -f deploy/docker-compose.yml up -d --build

Configure first, then start. The guide covers ports, credentials, local HTTP, and HTTPS enforcement.

A FEW THINGS WORTH KNOWING

Before you plug it in.

Explore the configuration guide
Do I need an account or a subscription?

No DNS Deny account or software subscription is required. You run the service on your infrastructure and sign in to your own dashboard. Hardware, hosting, and network access are yours to arrange.

Does it block every ad and tracker?

No. DNS Deny blocks matching domains. Ads served from the same domain as content can be difficult to separate, and devices using another DNS service can bypass your rules. Your blocklists and network configuration determine coverage.

Can I pause protection or set schedules for specific devices?

Yes. You can assign friendly aliases to devices by IP or MAC address, configure automated time-of-day/day-of-week schedules (such as bedtimes or study hours), or pause protection network-wide or per-device with a single click (from 5 minutes up to 48 hours).

Does DNS Deny support encrypted DNS protocols and DNSSEC?

Yes. Forwarded queries can use DNS-over-TLS (DoT on port 853) or DNS-over-HTTPS (DoH on port 443) with strict TLS SNI verification. Optional local DNSSEC validation verifies signed DNS data and rejects invalid signatures. DNSSEC does not encrypt traffic or authenticate unsigned zones.

Can I resolve local homelab domains like .home.arpa?

Yes. DNS Deny includes a local DNS engine for custom A, AAAA, and CNAME records. Configured local names (such as nas.home.arpa or router.lan) are answered locally and excluded from public threat discovery. If you configure a CNAME to an external name, only that target is resolved externally. Local answers still obey your filtering rules.

Where does my DNS traffic go?

DNS Deny runs on your server. Forwarded queries go to the upstream resolvers you configure. Query logging, when enabled, is stored in SQLite on your server; you control retention. Encrypted upstream protocols are available through configuration.

Can I modify it or use it in my own project?

Yes, under the GNU AGPL v3. Review the full license for the conditions that apply to modification, distribution, and modified versions made available over a network.

What do I need to get started?

A machine you manage, a supported deployment setup, and the ability to change your devices’ or router’s DNS settings. Use the installation guides to choose your architecture and package, binary, or Docker setup. Configure a unique admin password and HTTPS access before exposing the dashboard.