Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

What AdGuard Home does, and the open resolver trap

Every time a device opens a website or an app, it first asks a DNS server for the IP address of the name it wants. AdGuard Home sits at that point: it answers normally for legitimate names, and refuses those of ad networks, trackers or malicious sites listed in its blocklists. Filtering therefore works on a phone, a computer or a TV, in every app.

It also keeps a query log and statistics: you can see which devices contact which domains.

Warning, key point. A DNS server that answers anyone on the Internet is an open resolver. Attackers use them for amplification attacks: they send small queries while spoofing their victim's address, and your server sends much larger replies to that victim. Your VPS then takes part in a DDoS attack, its bandwidth is saturated, and it may be reported or cut off. The guide protecting a server against DDoS explains this mechanism.

The rule in this guide: port 53 is only open to the addresses you allow, or not at all, and your devices use encrypted DNS (DoH or DoT), which runs over TCP: the source address cannot be spoofed there, which prevents amplification. The allowed clients list, covered below, then reserves it for your devices.

02

Install AdGuard Home

You need a recent Linux VPS (Debian 12, Ubuntu 22.04 or 24.04), after the basic settings from securing a Linux VPS, with the UFW firewall active (it refuses incoming connections by default). AdGuard Home needs few resources: a small VPS is enough for a household.

With the official script (the recommended method on a VPS): it installs AdGuard Home in /opt/AdGuardHome and creates a service that starts with the system.

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

Run it as root (or with sudo sh instead of sh). The service is then controlled with sudo /opt/AdGuardHome/AdGuardHome -s restart (or stop, start, status).

Port 53 already taken on Ubuntu. Ubuntu runs systemd-resolved, which already listens on port 53 locally. Disable its listener, as the AdGuard Home documentation explains:

sudo mkdir -p /etc/systemd/resolved.conf.d
printf '[Resolve]\nDNS=127.0.0.1\nDNSStubListener=no\n' | sudo tee /etc/systemd/resolved.conf.d/adguardhome.conf
sudo mv /etc/resolv.conf /etc/resolv.conf.backup
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl reload-or-restart systemd-resolved

With Docker, the official image is adguard/adguardhome, with two volumes for /opt/adguardhome/work and /opt/adguardhome/conf (see installing Docker on a VPS). Be careful with ports: Docker writes its own filtering rules before UFW's, and a -p 53:53/udp would make port 53 public whatever UFW says. Only publish what you need:

sudo docker run -d --name adguardhome --restart unless-stopped \
  -v /opt/adguardhome/work:/opt/adguardhome/work \
  -v /opt/adguardhome/conf:/opt/adguardhome/conf \
  -p 127.0.0.1:3000:3000/tcp -p 443:443/tcp -p 853:853/tcp \
  adguard/adguardhome

With this command, only DoH (443) and DoT (853) can be reached from the Internet. The official script remains simpler on a VPS, because UFW keeps control of every port.

03

Setup wizard, ports and access

On first launch, AdGuard Home opens a wizard on port 3000. Do not open it in the firewall: use an SSH tunnel from your computer, then go to http://localhost:3000.

ssh -L 3000:127.0.0.1:3000 utilisateur@IP_DU_VPS
  1. Admin web interface: keep all interfaces, but choose a port other than 80, for example 8080, to leave port 80 free for the certificate. Do not open this port in UFW: you will reach it through the same tunnel (ssh -L 8080:127.0.0.1:8080 …).
  2. DNS server: port 53, on all interfaces.
  3. Account: a username and a long password.

Then open port 53 only for your fixed addresses (your home router's, if it does not change, or another server's), then encrypted DNS for everyone:

sudo ufw allow from 203.0.113.10 to any port 53
sudo ufw allow 853/tcp
sudo ufw allow 443/tcp

Replace 203.0.113.10 with your address. If you have no fixed address, do not open port 53 at all: use DoH and DoT, or go through a VPN (see installing WireGuard on a VPS), with AdGuard Home as the DNS for the tunnel's clients.

Add a second barrier in AdGuard Home: in the DNS settings, under access settings, fill in the allowed clients list (IP addresses, ranges or client IDs, covered below). As long as this list is empty, AdGuard Home answers everyone. Finally, check from an address that is not allowed that dig @IP_DU_VPS example.com gets no answer.

04

Encrypted DNS with DoH and DoT

Encrypted DNS protects your queries in transit and gets through where port 53 is filtered. DoH (DNS-over-HTTPS) uses port 443, at the address https://dns.example.com/dns-query; DoT (DNS-over-TLS) uses port 853. Both need a domain name and a certificate.

  1. Create a DNS A record, dns.example.com, pointing to the VPS's IPv4 address.
  2. Get a Let's Encrypt certificate with Certbot in standalone mode, with port 80 free: sudo ufw allow 80/tcp, then sudo certbot certonly --standalone -d dns.example.com.
  3. In AdGuard Home's encryption settings, enable encryption, enter the name dns.example.com, HTTPS port 443, DoT port 853, then the paths /etc/letsencrypt/live/dns.example.com/fullchain.pem and /etc/letsencrypt/live/dns.example.com/privkey.pem.
  4. So that the renewed certificate is picked up, add the script /etc/letsencrypt/renewal-hooks/deploy/adguard.sh, containing /opt/AdGuardHome/AdGuardHome -s restart, and make it executable.

Once encryption is active, the admin interface is also served over HTTPS on port 443: hence the importance of a long password. Port 443 can only be used by one program: if a web server already uses it on this VPS, dedicate a VPS to AdGuard Home instead.

Client IDs (ClientID) tell your devices apart, even when their IP address changes: https://dns.example.com/dns-query/telephone for DoH, or telephone.dns.example.com for DoT (you then need a certificate that also covers *.dns.example.com, so a wildcard certificate obtained through the DNS challenge). Added to the allowed clients list, they reserve your server for your devices.

05

Blocklists and device setup

Blocklists. A basic list is enabled from installation. In the filters menu, under DNS blocklists, add others from the built-in catalogue or by their address. A few well-maintained lists are better than many: each list uses memory and increases the risk of blocking a legitimate site. In the custom rules:

||pub.example.com^
@@||boutique.example.com^

The first line blocks a domain and its subdomains, the second (with @@) allows one that a list blocked by mistake. The query log shows what was blocked and by which list, which helps fix a broken site.

On an Android phone: in the network settings, under Private DNS, choose the provider hostname and enter dns.example.com (or telephone.dns.example.com with a client ID). This is DoT, on port 853.

On an iPhone, iPad or Mac: AdGuard Home's setup guide page offers a DoH or DoT configuration profile to download and install on the device.

On a computer: common browsers (Firefox, Chrome, Edge) accept a custom DoH address in their secure DNS settings: enter https://dns.example.com/dns-query. Filtering then only applies to the browser. For the whole computer, use the system's DNS setting, or the WireGuard VPN.

Keep a backup of the /opt/AdGuardHome/AdGuardHome.yaml file: it holds all your settings.

06

On CloudFive

CloudFive does not offer a managed AdGuard Home: you install it yourself on a VPS, with root access. The Ryzen VPS, from €5.99 per month, is more than enough:

  • an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage;
  • a dedicated IPv4 address, for the dns.example.com name and the allowed addresses list, and basic anti-DDoS protection included;
  • an emergency console in the customer area, useful if a firewall rule cuts off your SSH access;
  • Docker installs with the official script if you prefer that method (see the Docker VPS page).

The servers are in France, on our own network, monthly with no commitment, with support in French 7 days a week by ticket, on Discord and by phone. An open resolver on our addresses harms the whole network: follow this guide's access rules carefully. To compare tiers, see the guide choosing a VPS.

07

Frequently asked questions

How do I install AdGuard Home on a VPS?

Run the official install script, which puts AdGuard Home in /opt/AdGuardHome and creates a service. Then open the wizard on port 3000 through an SSH tunnel, choose the ports and the account, and restrict port 53 to your addresses.

Why not leave port 53 open to everyone?

An open DNS resolver is used for amplification attacks: attackers spoof a victim's address and your server sends it large replies. Only open port 53 to your addresses, fill in the allowed clients list, and use DoH or DoT for your mobile devices.

Which ports does AdGuard Home use?

Port 3000 over TCP for the setup wizard, port 53 over UDP and TCP for classic DNS, port 443 for DoH and port 853 over TCP for DoT. The admin interface uses the port chosen in the wizard.

How do I use AdGuard Home on a phone?

On Android, enter your server's name in the Private DNS setting: this is DNS-over-TLS on port 853. On iPhone, install the DoH or DoT configuration profile offered by AdGuard Home's setup guide.

Does AdGuard Home's encrypted DNS need a certificate?

Yes. DoH and DoT need a domain name pointing to the VPS and a valid certificate, for example obtained for free with Certbot and Let's Encrypt. Then enter the paths of fullchain.pem and privkey.pem in the encryption settings.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay