< Alle Themen
Drucken

Linux: AdGuard installieren

Voraussetzung (so getestet): Saubere Ubuntu-Installation, kein bestehender Portainer-Server o.ä.

There are multiple options of installing AdGuard Home. You can use Docker, SnapStore, download and run it manually. In this post, I’ll use the automated installation script.

Run the following command first:

apt update
apt install curl
apt install dnsutils

You’re ready to run the installation script:

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

Now AdGuard Home is installed, and you can open its web interface (the installation script prints its address).

 

Zusätzlicher Schritt:

Ggf. nutzt der Server den für AdGuard erforderlichen Port 53 bereits zu internen Zwecken. Für diesen Fall gilt folgende Anleitung:

After installing AdGuard home using the curl script, I stumbled upon this behavior on Ubuntu 21.10.
In the set-up instructions on the dashboard (127.0.0.1), it was mentioned that port 53 is occupied most likely by systemd-resolved.

I followed the provided instructions and it was fixed. In particular:

sudo mkdir /etc/systemd/resolved.conf.d
cd /etc/systemd/resolved.conf.d
sudo vim adguardhome.conf
sudo mv /etc/resolv.conf /etc/resolv.conf.backup
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl reload-or-restart systemd-resolved

The adguardhome.conf file contains:

[Resolve]
DNS=127.0.0.1
DNSStubListener=no

 

In der Firewall des Servers sind außerdem folgende Ports freizugeben, damit AdGuard korrekt funktioniert:

Port mappings you might need:

  • -p 53:53/tcp -p 53:53/udp: plain DNS.
  • -p 67:67/udp -p 68:68/tcp -p 68:68/udp: add if you intend to use AdGuard Home as a DHCP server.
  • -p 80:80/tcp -p 443:443/tcp -p 443:443/udp -p 3000:3000/tcp: add if you are going to use AdGuard Home’s admin panel as well as run AdGuard Home as an HTTPS/DNS-over-HTTPS server.
  • -p 853:853/tcp: add if you are going to run AdGuard Home as a DNS-over-TLS server.
  • -p 853:853/udp: add if you are going to run AdGuard Home as a DNS-over-QUIC server.
  • -p 5443:5443/tcp -p 5443:5443/udp: add if you are going to run AdGuard Home as a DNSCrypt server.
  • -p 6060:6060/tcp: debugging profiles.
Schlagwörter:
Inhaltsverzeichnis