Commit 07b034

2026-01-19 21:33:16 mb tech: updated
secure pi-hole & unifi "chained dns" configuration.md ..
@@ 9,7 9,7 @@
```mermaid
flowchart LR
%% Nodes
- Clients[Network Clients<br/>(Laptops, IoT, Phones)]
+ Clients["Network Clients<br/>(Laptops, IoT, Phones)"]
PiHole[("Pi-hole Container<br/>(Ad Blocking)")]
UniFi[("UniFi Gateway<br/>(Local Names & GeoIP)")]
Upstream["Secure Upstream DNS<br/>(Quad9 / Cloudflare)"]
@@ 29,12 29,78 @@
%% Firewall Logic
subgraph LAN_Security [UniFi Firewall Rules]
direction TB
- Rule1[Allow: Pi-hole to Internet:53]
- Rule2[Block: All Clients to Internet:53]
+ Rule1["Allow: Pi-hole to Internet:53"]
+ Rule2["Block: All Clients to Internet:53"]
end
```
+ ```mermaid
+ flowchart LR
+ Clients[Clients]
+ PiHole[PiHole]
+ UniFi[UniFi]
+ Upstream[Upstream]
+ Blocked[Blocked]
+
+ Clients --> PiHole
+ PiHole --> Blocked
+ PiHole --> UniFi
+ UniFi --> Upstream
+ ```
+ ```mermaid
+ flowchart LR
+ %% Nodes
+ Clients["Network Clients<br/>(Laptops, IoT, Phones)"]
+ PiHole[("Pi-hole Container<br/>(Ad Blocking)")]
+ UniFi[("UniFi Gateway<br/>(Local Names & GeoIP)")]
+ Upstream["Secure Upstream DNS<br/>(Quad9 / Cloudflare)"]
+ Blocked[("Blocked Domains<br/>(Ads/Trackers)")]
+
+ %% Styles
+ style PiHole fill:#f9f,stroke:#333,stroke-width:2px
+ style UniFi fill:#bbf,stroke:#333,stroke-width:2px
+ style Blocked fill:#ff9999,stroke:#333
+
+ %% Connections
+ Clients -->|"1. DNS Query (Port 53)"| PiHole
+ PiHole -->|"2. Blocked?"| Blocked
+ PiHole -->|"3. Allowed?"| UniFi
+ UniFi -->|"4. Resolve External"| Upstream
+
+ %% Firewall Logic
+ subgraph LAN_Security ["UniFi Firewall Rules"]
+ direction TB
+ Rule1["Allow: Pi-hole to Internet:53"]
+ Rule2["Block: All Clients to Internet:53"]
+ end
+ ```
+ ```mermaid
+ flowchart LR
+ %% Nodes
+ Clients["Network Clients<br/>(Laptops, IoT, Phones)"]
+ PiHole[("Pi-hole Container<br/>(Ad Blocking)")]
+ UniFi[("UniFi Gateway<br/>(Local Names & GeoIP)")]
+ Upstream["Secure Upstream DNS<br/>(Quad9 / Cloudflare)"]
+ Blocked[("Blocked Domains<br/>(Ads/Trackers)")]
+
+ %% Styles
+ style PiHole fill:#f9f,stroke:#333,stroke-width:2px
+ style UniFi fill:#bbf,stroke:#333,stroke-width:2px
+ style Blocked fill:#ff9999,stroke:#333
+ %% Connections
+ Clients -->|"(1) DNS Query (Port 53)"| PiHole
+ PiHole -->|"(2) Blocked?"| Blocked
+ PiHole -->|"(3) Allowed?"| UniFi
+ UniFi -->|"(4) Resolve External"| Upstream
+
+ %% Firewall Logic
+ subgraph LAN_Security ["UniFi Firewall Rules"]
+ direction TB
+ Rule1["Allow: Pi-hole to Internet:53"]
+ Rule2["Block: All Clients to Internet:53"]
+ end
+ ```
---
## Implementation Steps
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9