Learn how to deploy privacy-preserving DNS filtering with DNS-over-HTTPS and curated threat feeds to block malware, phishing and unwanted content across home and small business networks. This expert guide explains the concepts, tooling choices, and verified configuration steps, with practical enforcement tips, monitoring, and maintenance routines suited to 2026 environments.
DNS filtering and DNS-over-HTTPS: concepts, benefits, and limitations
DNS filtering blocks lookups to known malicious or unwanted domains before connections complete. It reduces exposure to phishing, command-and-control, cryptomining and adware, and it helps enforce acceptable use policies.
DNS-over-HTTPS (DoH) encrypts DNS queries between clients and resolvers using HTTPS. It protects DNS metadata from passive observers and mitigates tampering on untrusted networks. Combined with filtering, DoH delivers both privacy and control.
Limitations remain. DNS filtering cannot inspect encrypted payloads, does not replace endpoint protection, and can block legitimate domains if feeds are overbroad. DoH does not hide the destination IP after DNS resolution. Validate policies and provide an allowlist process to avoid business disruption.
Plan your deployment: home vs. SMB prerequisites
Define the scope first. Decide whether to run a local resolver with policy control or use a managed cloud resolver with profiles and reporting. Inventory routers, switches, servers, identity providers, and endpoint operating systems.
Baseline requirements include administrative access to your router or firewall, the ability to set DHCP DNS options, and a device to host a resolver if self-managed. Ensure you can block outbound DNS to enforce your resolver.
For SMB networks, account for multiple VLANs, guest access, split DNS for internal domains, and integration with directory services. Plan change windows and a rollback path, and notify users to reduce support tickets.
Step-by-step for home networks: local DNS filtering with DoH
The following options use a local resolver that applies blocklists and forwards upstream via DoH. Pick one approach based on skills and hardware.
Option A: AdGuard Home with DoH upstream
- Install AdGuard Home on a Raspberry Pi, an always-on PC, a NAS, or in a container. Follow the platform installer and bind it to a static IP on your LAN.
- Enable filtering and add threat feeds. Use well-maintained domain blocklists focused on malware, phishing and tracking. Avoid overlapping lists that can cause excessive blocking.
- Configure upstream DoH. Set trusted DoH endpoints offered by reputable recursive resolvers. Use the exact HTTPS endpoint format required by AdGuard Home.
- Turn on SafeSearch or parental categories only if needed. Review category descriptions carefully to avoid overblocking education or work resources.
- Set DHCP on your router so the AdGuard Home IP is the primary DNS server for all clients. Reserve the resolver IP to prevent conflicts.
- Enforce usage by creating a firewall rule that blocks outbound UDP and TCP 53 from LAN to the internet, except to the resolver. Allow the resolver to reach its upstream DoH over HTTPS.
- Test resolution on several devices. Resolve a known blocked domain to confirm policy, and a known clean domain to confirm normal operation.
Option B: Pi-hole with a DoH proxy
- Install Pi-hole on a dedicated host or container. During setup, choose a temporary plaintext upstream to complete installation.
- Deploy a DoH proxy such as a lightweight HTTPS DNS forwarder on the same host or another local host. Configure it with trusted DoH endpoints.
- Point Pi-hole to the local DoH proxy as its upstream. Confirm that Pi-hole forwards queries through HTTPS by reviewing logs on both services.
- Add threat feeds to Pi-hole via its blocklist configuration. Prefer lists that clearly document update cadence and removal process.
- Switch LAN clients to Pi-hole by updating DHCP DNS options on the router. Disable or overwrite ISP-provided DNS settings.
- Block outbound port 53 from clients to the internet, leaving the resolver and DoH proxy permitted to use HTTPS.
Option C: Router-centric DoH with OpenWrt or similar
- On OpenWrt-class routers, install a DoH client package and set DNS to use the proxy as the system resolver.
- Enable domain filtering through built-in adblock modules or by subscribing to compatible blocklists. Validate memory and CPU usage under load.
- Apply DNS redirection rules that force all LAN DNS to traverse the router resolver. Prevent bypass via guest and IoT VLAN policies.
Client enforcement and compatibility
- Windows 11 and newer support system DoH. You can configure a policy to use your resolver while still sending to the local DNS server. For centralized control, use Group Policy or MDM configuration profiles.
- Android supports Private DNS using DNS-over-TLS. In managed environments, set the profile to point to your resolver or to a provider that matches your filtering policy.
- Browsers can enable their own secure DNS. Align browser settings to use the system resolver or specify your DoH endpoint to avoid split behavior.
- For gaming consoles and smart TVs, leave DNS automatic but ensure your DHCP points to the local resolver. Test streaming and update allowlists if needed.
Harden the home edge. Combine this with best practices for securing your home Wi-Fi network and with how to secure your home network for layered protection.
Step-by-step for SMB networks: gateway DNS firewall or cloud-managed DoH
SMB deployments benefit from centralized control, identity-aware policies, and audit trails. Two proven patterns are a gateway DNS firewall on-prem, or a cloud-managed resolver with agents and site connectors.
Gateway firewall with DNS filtering
- Use a business firewall that supports DNS filtering and response policy zones or blocklists. Popular open platforms offer packages that import curated feeds and apply rules per interface or VLAN.
- Run a local resolver on the firewall and forward upstream over DoH or DNS-over-TLS. Confirm certificate validation and fallback behavior.
- Create policy sets by network segment. Apply strict filtering on guest and IoT, moderate on staff, and tailored allowlists for line-of-business apps.
- Integrate with directory services if available. Map device or user groups to DNS policies through DHCP reservations, IP ranges, or client identifiers.
- Enforce by blocking outbound DNS from all segments except the firewall. Allow only the firewall to reach upstream resolvers over HTTPS or TLS.
- Stage rollout per VLAN during low-traffic windows. Monitor logs for false positives and add just-in-time allowlists with ticket references.
Cloud-managed DNS security with DoH
- Choose a provider that offers DoH endpoints, role-based policy management, identity tagging, and detailed logs. Review data handling and retention options for compliance.
- Create policies for malware, phishing, newly registered domains, content categories, and custom block or allow lists. Apply policies to locations, roaming clients, and specific device groups.
- Deploy site connectors on gateways or SD-WAN edges to steer DNS to the provider. Install lightweight agents on laptops for offsite protection.
- Update DHCP scopes to point to the provider resolvers if the service supports direct recursion from clients. Alternatively, forward from your local resolver to the cloud over DoH.
- Block direct DNS egress from clients. Permit only the connector or resolver to reach the provider endpoints.
- Export logs to your SIEM for correlation. Create alerts for spikes in blocked queries, lookups of high-risk categories, or queries from privileged segments.
Identity, split DNS, and resilience
- Preserve internal name resolution. Configure split DNS so internal domains resolve via your authoritative servers, while external queries go to the filtering resolver.
- Set high-availability. Use at least two resolvers per site, with health checks and automatic failover. Validate behavior during link or resolver outages.
- Document a bypass procedure for critical incidents. Use time-bound allowlists and approvals, and audit changes regularly.
Selecting and maintaining threat feeds
Use feeds that focus on security outcomes, explain their curation, and publish timely removals for false positives. Categories often include malware distribution domains, phishing kits, command-and-control, and known trackers.
Prefer feeds that support standardized formats such as hosts lists, RPZ, or JSON. Confirm update cadence and test in a staging policy before production. Maintain a primary blocklist set and a minimal supplemental set to avoid duplication.
- Evaluate quality by spot-checking recent additions and removals. Validate that domains still resolve or are active before enforcement if feasible.
- Use a change control process for adding or removing feeds. Track the origin, purpose, and potential overlap with existing lists.
- Maintain a short, documented allowlist for business-critical services. Review allowlists periodically to avoid permanent risk acceptance.
- For privacy, avoid feeds that embed tracking pixels or require unnecessary telemetry for access.
Monitoring, logging, privacy, and compliance
Enable query logging on the resolver or in the cloud console. Set retention that aligns with legal and policy requirements, and minimize storage of full client identifiers when not needed.
Create dashboards for blocked domains by category, top talkers by device group, and newly seen domains. Alert on anomalies such as rapid lookups to algorithmically generated domains or sudden spikes from a single host.
Integrate DNS telemetry with your SIEM or analytics stack. Use correlation with endpoint and network data to prioritize investigations. When trends suggest account compromise, reinforce identity controls using multi-factor authentication.
Troubleshooting and common pitfalls
- Bypass attempts and leaks: Some applications hardcode DNS or use their own DoH. Block outbound DNS and restrict access to known DoH endpoints where policy allows. Prefer application controls over blanket blocks when business critical.
- Captive portals and guest access: Allow temporary plaintext DNS on guest VLANs until portal sign-in completes. Then enforce normal policies.
- Content delivery performance: Filters can affect CDN lookups. If latency appears, test alternative upstream resolvers, and disable ECS-related features only after measuring impact.
- False positives: Use a documented allowlist workflow. Require a ticket and justification. Review after a set period to confirm the need persists.
- IPv6 considerations: Apply the same policies to IPv6. Advertise your resolver via Router Advertisements or DHCPv6 and block external IPv6 DNS where appropriate.
- Browser conflicts: Align browser secure DNS settings with corporate policy. If the browser uses a different DoH provider, set managed preferences to use the enterprise resolver.
Security hardening and next steps
DNS filtering is one layer. Combine it with identity-aware access, endpoint protection, and network segmentation. Align policy with how to implement Zero Trust security to constrain blast radius and contain compromise.
Use traffic analytics to find stealthy threats. Enrich DNS telemetry with host behavior as described in behavioral analytics for enhanced threat detection. Iterate policies based on incident lessons and red team findings.
Document the architecture, maintenance calendar, and escalation paths. Review feeds, resolver versions, and firewall rules quarterly or after material changes in the environment.
Verification checklist before go-live
- Clients receive the correct DNS via DHCP or device management, both IPv4 and IPv6.
- Outbound DNS from clients is blocked, and only the resolver can reach upstream DoH.
- Threat feeds are current and applied. Test a known test domain from each category.
- Internal domains resolve correctly via split DNS. External domains use the filtering resolver.
- Logs appear in the dashboard and in centralized logging. Alerts fire on test events.
- Rollback and bypass procedures are documented and tested.
Frequently Asked Questions
Is DNS-over-HTTPS faster than traditional DNS?
Performance depends on network conditions, resolver proximity, and caching. DoH adds TLS overhead but can be comparable in speed with efficient resolvers and persistent connections. Test with your topology before broad rollout.
Can DNS filtering break legitimate applications?
Yes, if a required domain appears on a blocklist or if an app uses its own DNS that your policy restricts. Maintain an allowlist process, monitor logs during rollout, and stage changes per segment.
Should I use DNS-over-HTTPS or DNS-over-TLS?
Both encrypt DNS in transit. DoH blends with HTTPS traffic and is widely supported by browsers and modern stacks. DoT is efficient and simpler on some gateways. Choose the one best supported by your resolver and policy tools.
How often should threat feeds update?
Updates should be frequent enough to track active threats without causing instability. Use feeds with a clear update policy and monitor impact. Schedule updates during low-usage periods and log changes.
How do I enforce my resolver on remote laptops?
Use a cloud-managed DNS security service with roaming client agents, or configure system DoH profiles via MDM. Block direct DNS on host firewalls where permitted and verify with periodic checks.
Relacionados
How to deploy passkeys (FIDO2/WebAuthn) and go passwordless in Microsoft 365 and Google Workspace: migration steps, recovery policies, and phishing-resistant MFA setup
How to deploy passkeys (FIDO2/WebAuthn) with Microsoft Entra ID and Okta in 2026: phishing-resistant MFA, device-binding policies, and recovery workflows
Complete guide to implementing Zero Trust in hybrid cloud environments in 2026: identity-aware proxies, device posture enforcement, microsegmentation, and continuous authentication
How to deploy passkeys and FIDO2 security keys across iOS, Android, and Windows in 2026: phishing-resistant logins, account recovery, and enterprise rollout checklist