{"id":426,"date":"2026-08-30T10:10:00","date_gmt":"2026-08-30T08:10:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?p=426"},"modified":"2026-10-24T01:12:11","modified_gmt":"2026-10-23T23:12:11","slug":"dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/","title":{"rendered":"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network"},"content":{"rendered":"<p>Pi-hole and AdGuard Home filter DNS queries: requests for domain names can be blocked before a connection starts. This can reduce advertising and tracking from separate domains across many devices. It does not inspect page contents or remove individual advertisements served from the same domain as wanted content. Direct IP connections, alternative resolvers and tunnels can bypass DNS filtering.<\/p>\n<figure class=\"lw-diagram\"><img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-426-review-20261024.png\" width=\"1120\" height=\"580\" loading=\"lazy\" alt=\"A port-53 rule does not inspect all internet traffic.\"><figcaption>DNS filtering controls domain lookups on the configured path. Encrypted upstream traffic does not guarantee that every client uses that path.<\/figcaption><\/figure>\n<h2>A clear DNS path across VLANs<\/h2>\n<p>A dedicated server VLAN is one possible location for the resolver, not a requirement for segmentation. A fixed address or DHCP reservation makes the service predictable. Each participating network can advertise the resolver through DHCP. IPv6 also needs a consistent DNS configuration through the mechanisms supported by the clients and gateway; an IPv4 setting alone does not cover IPv6.<\/p>\n<p>Firewall rules should allow client networks to reach only the approved resolver addresses on UDP and TCP port 53. The destination is the server\u2019s zone, not automatically the Gateway zone. Older UniFi rules use names such as LAN IN; current zone-based policies use source and destination zones. Administration of the resolver should remain restricted to authorized management clients.<\/p>\n<p>The resolver must also accept requests from the routed networks. Pi-hole\u2019s default local-only mode can reject other VLANs even when the firewall permits traffic. A suitable listening mode and firewall restrictions must be configured together. Opening DNS to the internet is unnecessary for this design.<\/p>\n<h2>Encrypted upstream traffic<\/h2>\n<p>Upstream means the server to which the local filter forwards unanswered queries. AdGuard Home supports encrypted upstreams directly. Pi-hole can use a suitable local forwarding service; older instructions using <code>cloudflared proxy-dns<\/code> are no longer a current installation method.<\/p>\n<p>DoT uses TLS, normally on TCP port 853. DoH carries queries through HTTPS, usually on port 443. Both protect the configured connection, not every link in the resolution chain. The selected provider still receives the queries. Encryption is not DNSSEC validation, which checks signed DNS data. DoH can be harder to distinguish from other HTTPS traffic, but is neither invisible nor impossible to block. Low latency is not guaranteed.<\/p>\n<h2>Enforcement has limits<\/h2>\n<p>DHCP advertises DNS settings; it does not force applications to use those settings. A policy can allow the approved resolvers and block other plain DNS traffic from clients. Blocking may make an application fail instead of switching to the approved server. Resolver upstream traffic needs separate permission.<\/p>\n<p>Destination NAT can redirect matching plain DNS traffic where the gateway version and topology support the required rule. Exceptions for all approved resolvers, return routing and IPv4\/IPv6 behavior need explicit checks. A port-53 redirect does not capture DoH, DoT, a VPN or a connection that stays within a subnet without crossing the gateway.<\/p>\n<p>Lists of known encrypted DNS endpoints provide partial coverage and need maintenance. Blocking shared CDN addresses can break unrelated services. Managed browser policies or restricted internet access for a dedicated device network can be more predictable, but must match the required applications. UniFi\u2019s own Content Filtering also redirects DNS; combining both filters requires a deliberate design and verification of local names.<\/p>\n<h2>Validation and operation<\/h2>\n<p>From each VLAN, checks should cover a permitted domain, a deliberately blocked test domain, internal names, TCP and UDP DNS, and the configured IPv6 path. Query logs show which resolver actually handled a request. Cached answers and existing connections can continue temporarily after a rule change. A high block percentage alone proves neither effective privacy protection nor a faulty application.<\/p>\n<div class=\"lw-faq\">\n<h2>Questions and answers<\/h2>\n<h3>What happens if the resolver fails?<\/h3>\n<p>New lookups can fail while cached names and established connections continue to work. A second filtered resolver improves availability only if the clients and firewall can actually reach that instance. A public secondary resolver can bypass the policy; client selection is not necessarily strict primary-then-secondary failover.<\/p>\n<h3>Does Firefox\u2019s canary domain enforce filtering?<\/h3>\n<p>A negative answer for <code>use-application-dns.net<\/code> signals Firefox to disable automatically enabled DoH under the documented conditions. It does not override an explicit user choice to enable DoH and is not a network-wide enforcement mechanism.<\/p>\n<h3>How should false positives be handled?<\/h3>\n<p>A reproducible failure, the client\u2019s query log and a narrowly scoped temporary exception can identify the relevant domain. Exceptions should be reviewed after testing. DNS logs reveal browsing-related metadata, so access and retention should be limited to the operational need.<\/p>\n<\/div>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.pi-hole.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pi-hole documentation<\/a><\/li>\n<li><a href=\"https:\/\/docs.pi-hole.net\/ftldns\/interfaces\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pi-hole: interfaces<\/a><\/li>\n<li><a href=\"https:\/\/docs.pi-hole.net\/guides\/dns-over-https\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pi-hole: cloudflared deprecation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AdguardTeam\/AdGuardHome\/blob\/master\/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">AdGuard Home: limitations<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AdguardTeam\/AdGuardHome\/wiki\/Configuration\" target=\"_blank\" rel=\"noopener noreferrer\">AdGuard Home: configuration<\/a><\/li>\n<li><a href=\"https:\/\/help.ui.com\/hc\/en-us\/articles\/12568927589143-Content-and-Domain-Filtering-in-UniFi\" target=\"_blank\" rel=\"noopener noreferrer\">UniFi: Content Filtering<\/a><\/li>\n<li><a href=\"https:\/\/help.ui.com\/hc\/en-us\/articles\/115003173168-Zone-Based-Firewalls-in-UniFi\" target=\"_blank\" rel=\"noopener noreferrer\">UniFi: zone-based firewalls<\/a><\/li>\n<li><a href=\"https:\/\/www.rfc-editor.org\/info\/rfc8484\/\" target=\"_blank\" rel=\"noopener noreferrer\">RFC 8484: DNS over HTTPS<\/a><\/li>\n<li><a href=\"https:\/\/support.mozilla.org\/en-US\/kb\/canary-domain-use-application-dnsnet\" target=\"_blank\" rel=\"noopener noreferrer\">Firefox: canary domain<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to configure a centralized local DNS resolver across all VLANs with DoH\/DoT upstream encryption and enforce router-level firewall rules to prevent hardcoded DNS bypasses.<\/p>\n","protected":false},"author":1,"featured_media":13986,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[91142,91318,91321,91143,91707,91324],"class_list":["post-426","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","tag-dns","tag-firewall","tag-network-security","tag-pi-hole","tag-unifi","tag-vlan"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"Pi-hole and AdGuard Home in a UniFi network: provide DNS across VLANs, encrypt upstream connections and check bypass paths.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"Pi-hole and AdGuard Home in a UniFi network: provide DNS across VLANs, encrypt upstream connections and check bypass paths.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-30T08:10:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-23T23:12:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network\",\"datePublished\":\"2026-08-30T08:10:00+00:00\",\"dateModified\":\"2026-10-23T23:12:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/\"},\"wordCount\":766,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png\",\"keywords\":[\"DNS\",\"Firewall\",\"Network Security\",\"Pi-hole\",\"UniFi\",\"VLAN\"],\"articleSection\":[\"Raspberry PI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/\",\"name\":\"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png\",\"datePublished\":\"2026-08-30T08:10:00+00:00\",\"dateModified\":\"2026-10-23T23:12:11+00:00\",\"description\":\"Pi-hole and AdGuard Home in a UniFi network: provide DNS across VLANs, encrypt upstream connections and check bypass paths.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png\",\"width\":1200,\"height\":630,\"caption\":\"DNS-Level Ad Blocking & Security: Pi-hole and AdGuard Home in a UniFi Network\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network | Lukas Wojcik","description":"Pi-hole and AdGuard Home in a UniFi network: provide DNS across VLANs, encrypt upstream connections and check bypass paths.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/","og_locale":"en_US","og_type":"article","og_title":"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network | Lukas Wojcik","og_description":"Pi-hole and AdGuard Home in a UniFi network: provide DNS across VLANs, encrypt upstream connections and check bypass paths.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-08-30T08:10:00+00:00","article_modified_time":"2026-10-23T23:12:11+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network","datePublished":"2026-08-30T08:10:00+00:00","dateModified":"2026-10-23T23:12:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/"},"wordCount":766,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png","keywords":["DNS","Firewall","Network Security","Pi-hole","UniFi","VLAN"],"articleSection":["Raspberry PI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/","name":"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png","datePublished":"2026-08-30T08:10:00+00:00","dateModified":"2026-10-23T23:12:11+00:00","description":"Pi-hole and AdGuard Home in a UniFi network: provide DNS across VLANs, encrypt upstream connections and check bypass paths.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-426-dns-level-ad-blocking-security-pi-ho-g.png","width":1200,"height":630,"caption":"DNS-Level Ad Blocking & Security: Pi-hole and AdGuard Home in a UniFi Network"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/dns-level-ad-blocking-security-pi-hole-and-adguard-home-in-a-unifi-network\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"DNS-Level Ad Blocking &amp; Security: Pi-hole and AdGuard Home in a UniFi Network"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=426"}],"version-history":[{"count":7,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/426\/revisions"}],"predecessor-version":[{"id":22952,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/426\/revisions\/22952"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/13986"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}