Open Source 2022

FilterDNS

Self-hosted DNS filtering with per-profile configuration. Block ads, trackers, and malware via DoH, DoT, and DNS53.

Role: Developer

DNSsecurityDockerPython

About the Project

Self-hosted DNS filtering service that blocks ads, trackers, and malware at the DNS level with device-specific configurations. Queries are routed through a Python gateway that extracts profile information from subdomains (DoH/DoT) or source IPs (legacy DNS), applies blocklists and custom rules, and logs all activity to PostgreSQL. Built with Python (Quart/Hypercorn) on the backend and SvelteKit on the frontend, deployed as a Docker Compose stack.

Features

  • Multi-protocol — DNS-over-HTTPS (port 443), DNS-over-TLS (port 853), and traditional DNS (port 53)
  • Per-profile filtering — wildcard subdomains (e.g., my-devices.filterdns.example.com) for device-specific blocklists and custom allow/deny rules
  • Pre-built rule presets — integrated support for Hagezi, StevenBlack, and OISD blocklists
  • Self-service management — profile creation, query logging, statistics, and temporary filtering pauses (5/15/30/60 minutes)
  • Legacy device support — IP-based profile linking for devices that don’t support DoH/DoT
  • REST API — public and authenticated endpoints for profile, rule, and device management
  • Docker deployment — ships as a Docker Compose stack with PostgreSQL and Alembic migrations