software:service:adguardhome
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| software:service:adguardhome [2025/03/02 10:14] – warnaud | software:service:adguardhome [2026/02/19 08:34] (current) – [debug/troubleshoot] warnaud | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Infos ====== | ||
| + | Following Pi-Hole' | ||
| + | <code bash> | ||
| + | dig google.com @8.8.8.8 | grep time | ||
| + | ;; Query time: 7 msec | ||
| + | dig google.com @192.168.1.1 -p 53 | grep time # | ||
| + | ;; Query time: 10 msec | ||
| + | dig google.com @192.168.1.10 | grep time #Raspberry Pi 2... | ||
| + | ;; Query time: 1316 msec | ||
| + | dig google.com @192.168.1.11 | grep time # | ||
| + | ;; Query time: 12 msec | ||
| + | </ | ||
| + | Now the same after moving both to AdGuard: | ||
| + | <code bash> | ||
| + | dig google.com @8.8.8.8 | grep time | ||
| + | ;; Query time: 10 msec | ||
| + | dig google.com @192.168.1.1 | grep time | ||
| + | ;; Query time: 6 msec | ||
| + | dig google.com @192.168.1.10 | grep time | ||
| + | ;; Query time: 13 msec | ||
| + | dig google.com @192.168.1.11 | grep time | ||
| + | ;; Query time: 10 msec | ||
| + | dig google.com @192.168.1.15 | grep time #Docker container see below | ||
| + | ;; Query time: 4 msec | ||
| + | </ | ||
| + | ====== Install ====== | ||
| + | ~straightforward once you have the correct archive... | ||
| + | * Raspberry Pi: <code bash> | ||
| + | * BeagleBoneBlack: | ||
| + | |||
| + | <code bash> | ||
| + | tar xvzf AdGuardHome_linux*.tar.gz | ||
| + | cd AdGuardHome | ||
| + | ./ | ||
| + | </ | ||
| + | And voilà ... :FIXME might be better to put in /opt\\ | ||
| + | Once installed, go to http://IP of your device:3000 to start the setup\\ | ||
| + | In Settings/ | ||
| + | |||
| + | <code bash> | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | |||
| + | Enjoy your new DNS | ||
| + | |||
| + | ====== Docker ====== | ||
| + | Here is a Docker version:\\ | ||
| + | :!: it's a container with a fixedIP ≠ from the docker server :!: | ||
| + | <code bash> | ||
| + | <code bash> | ||
| + | git clone https:// | ||
| + | cd docker-adguard-unbound | ||
| + | vi docker-compose.yml | ||
| + | </ | ||
| + | <code xml> | ||
| + | services: | ||
| + | adguard-unbound: | ||
| + | container_name: | ||
| + | image: ghcr.io/ | ||
| + | restart: unless-stopped | ||
| + | hostname: adguard-unbound | ||
| + | volumes: | ||
| + | - " | ||
| + | - " | ||
| + | - " | ||
| + | networks: | ||
| + | my_macvlan: | ||
| + | ipv4_address: | ||
| + | |||
| + | networks: | ||
| + | my_macvlan: | ||
| + | external: true | ||
| + | </ | ||
| + | <code bash> | ||
| + | mkdir -p ./ | ||
| + | mkdir -p ./ | ||
| + | mkdir -p ./unbound | ||
| + | |||
| + | docker compose up -d</ | ||
| + | then finish the setup in http:// | ||
| + | DNS of unbound is in unbound/ | ||
| + | |||
| + | ===== optimisation ===== | ||
| + | <code bash> vi ./ | ||
| + | <code perl> | ||
| + | prefetch: yes | ||
| + | prefetch-key: | ||
| + | msg-cache-size: | ||
| + | rrset-cache-size: | ||
| + | # Minimum caching time for any record (in seconds) | ||
| + | cache-min-ttl: | ||
| + | </ | ||
| + | <code bash> | ||
| + | docker compose up -d</ | ||
| + | Better Host perfs | ||
| + | <code bash> | ||
| + | sysctl -w net.core.rmem_max=26214400 | ||
| + | sysctl -w net.core.wmem_max=26214400 | ||
| + | sysctl -w net.ipv4.tcp_rmem=" | ||
| + | sysctl -w net.ipv4.tcp_wmem=" | ||
| + | </ | ||
| + | ===== Tweaks ===== | ||
| + | Improve cache & speed :FIXME | ||
| + | ===== Upstream DNS ===== | ||
| + | ==== 2 files ==== | ||
| + | |||
| + | <code bash> | ||
| + | vi / | ||
| + | <code perl> | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #DNS.WATCH | ||
| + | # | ||
| + | # | ||
| + | #OpenDNS | ||
| + | # | ||
| + | # | ||
| + | # Freenom world | ||
| + | # | ||
| + | # | ||
| + | #Quad9 | ||
| + | #9.9.9.9 | ||
| + | # | ||
| + | # Quad9 Unfiltered (No blocking, just resolution) | ||
| + | tls:// | ||
| + | https:// | ||
| + | 9.9.9.10 | ||
| + | 149.112.112.10 | ||
| + | </ | ||
| + | <code bash>vi / | ||
| + | <code perl> | ||
| + | ... | ||
| + | dns: | ||
| + | # Listen on all interfaces, port 53 | ||
| + | bind_hosts: | ||
| + | - 0.0.0.0 | ||
| + | - ::0 | ||
| + | port: 53 | ||
| + | ... | ||
| + | # Path to upstream DNS file | ||
| + | upstream_dns_file: | ||
| + | ... | ||
| + | # Bootstrap DNS (required for hostname-based upstreams like dns.quad9.net) | ||
| + | bootstrap_dns: | ||
| + | - 1.1.1.1 | ||
| + | - 8.8.8.8 | ||
| + | - 208.67.222.222 | ||
| + | ... | ||
| + | # Enable DNSSEC validation (Quad9 supports it) | ||
| + | enable_dnssec: | ||
| + | </ | ||
| + | ==== One file (AdGuardHome.yaml) ==== | ||
| + | Optimized for Rapberry Pi/ | ||
| + | <code perl> | ||
| + | dns: | ||
| + | bind_hosts: | ||
| + | - 0.0.0.0 | ||
| + | port: 53 | ||
| + | | ||
| + | # UPSTREAMS : 100% chiffrés + diversifiés | ||
| + | upstream_dns: | ||
| + | - tls:// | ||
| + | - tls:// | ||
| + | - tls:// | ||
| + | - tls:// | ||
| + | | ||
| + | upstream_dns_file: | ||
| + | upstream_mode: | ||
| + | upstream_timeout: | ||
| + | | ||
| + | # BOOTSTRAP : IPs uniquement (zéro dépendance hostname) | ||
| + | bootstrap_dns: | ||
| + | - 9.9.9.10 | ||
| + | - 149.112.112.10 | ||
| + | - 2620: | ||
| + | | ||
| + | # SÉCURITÉ ABSOLUE | ||
| + | enable_dnssec: | ||
| + | refuse_any: true # Rejette ANY queries (attaques) | ||
| + | cache_enabled: | ||
| + | cache_size: 4194304 | ||
| + | | ||
| + | # ANTI-MITM | ||
| + | bogus_nxdomain: | ||
| + | - ' | ||
| + | - ' | ||
| + | - ' | ||
| + | | ||
| + | # CLIENTS | ||
| + | anonymize_client_ip: | ||
| + | ratelimit: 20 | ||
| + | | ||
| + | # AVANTAGES SÉCURITÉ | ||
| + | max_goroutines: | ||
| + | </ | ||
| + | <code bash> | ||
| + | sudo systemctl daemon-reload | ||
| + | sudo systemctl restart AdGuardHome | ||
| + | sudo systemctl status AdGuardHome | ||
| + | </ | ||
| + | ===== debug/ | ||
| + | <code bash> | ||
| + | cd / | ||
| + | ./ | ||
| + | </ | ||
