Руководства

Приватный DNS с AdGuard Home и Unbound

Промежуточный20 мин чтенияОбновлено 12 мая 2026 г.
Краткий ответ

AdGuard Home фильтрует и обслуживает DNS-over-HTTPS; Unbound за ним выполняет полную рекурсию, так что ни один вышестоящий резолвер никогда не видит ваши запросы. На экземпляре за $4 пара использует менее 200 МБ ОЗУ и заменяет самый богатый источник поведенческих данных о вас — резолвер вашего ISP.

01 Установите Unbound как рекурсивный резолвер

Bind it to localhost on a non-standard port so AdGuard Home can take 53.

apt install -y unbound
cat >/etc/unbound/unbound.conf.d/local.conf <<'EOF'
server:
  interface: 127.0.0.1@5335
  do-ip6: yes
  prefetch: yes
  hide-identity: yes
  hide-version: yes
  qname-minimisation: yes
EOF
systemctl restart unbound

02 Установите AdGuard Home

The installer sets up a systemd unit and a web interface on port 3000 for initial configuration.

curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

03 Укажите AdGuard на Unbound

In Settings → DNS, set the upstream to 127.0.0.1:5335 and disable all other upstreams. Full recursion means no third party sees your queries at all.

04 Включите DNS-over-HTTPS

Get a certificate with Certbot, then enable DoH on 443 and DoT on 853 in the encryption settings. Clients then reach the resolver privately in transit as well as at rest.

certbot certonly --standalone -d dns.example.com

05 Защитите его

Restrict access by client IP, or require DoH with a secret path. An open resolver is recruited into DNS amplification attacks within days and will be null-routed.

Часто задаваемые вопросы

Это лучше, чем публичный резолвер?

Приватно — да: никакая третья сторона вообще не видит ваши запросы при полной рекурсии. Публичные резолверы быстрее из-за размера кэша; компромисс — скорость против видимости.

Сколько стоит это запускать?

$4 в месяц. Это самое дешёвое значимое улучшение приватности.