Canonical page: https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/

Language: English. Source snapshot: 2026-10-21. Generated: 2026-10-21T13:31:28.274Z.

[Home](https://koalavps.com/) / [Explore](https://koalavps.com/resources/) /  The KoalaVPS field notes

The KoalaVPS field notes

# A resolver for your devices, not an open amplifier.

A private DNS resolver can give you control over resolution and filtering when access is deliberately restricted.

[Find your VPS](https://koalavps.com/vps/)

## IN THIS DOCUMENT

[Choose the role](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-1)[Keep it private](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-2)[Set a logging policy](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-3)[Test more than one name](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-4)[Prove strangers cannot query it](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-5)[Keep encrypted DNS claims precise](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-6)[Choose the resolver chain before opening a port](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-7)[A loopback Unbound starting point](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-8)[Run an acceptance checklist from two networks](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-9)[Diagnose timeouts, loops and validation failures](https://koalavps.com/guides-self-host-dns-resolver-on-a-vps/#section-10)[Knowledge base](https://koalavps.com/resources/)

## Choose the role

A recursive resolver such as Unbound and a filtering interface such as AdGuard Home solve related but distinct problems. Decide whether the service recurses itself or forwards to an upstream and understand which party then sees queries.

## Keep it private

An unrestricted public resolver can be abused for reflection attacks. Bind to a private network or allow only authorised sources, including IPv6. If using encrypted DNS, authenticate or otherwise restrict access appropriately instead of assuming HTTPS makes it private.

## Set a logging policy

DNS queries can reveal sensitive browsing and application activity. Disable unnecessary retention, protect the records you keep and explain the scope to users. Encrypted transport protects a path; it does not prevent the resolver itself seeing queries.

## Test more than one name

Verify DNSSEC behaviour where enabled, IPv4 and IPv6 results, filtering exceptions and recovery when an upstream fails. Keep a secure way to fix access without depending exclusively on the resolver you are repairing.

## Prove strangers cannot query it

Bind the resolver to the intended interface, define the permitted client ranges and restrict the firewall. Validate configuration before restarting. Query it from an authorised client, then repeat from outside the trusted network: that request should be refused or time out. Check IPv6 separately. A resolver that accepts arbitrary internet queries can become a source of abuse.

- Run the configuration validator before applying changes

- Test a permitted client and a denied client

- Keep verbose query diagnostics temporary

```
unbound-checkconf
```

Official documentation: [Unbound access-control configuration](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html)

## Keep encrypted DNS claims precise

DNS-over-HTTPS or DNS-over-TLS encrypts a particular transport path. The resolver still receives the query, and a forwarding resolver can pass it to another operator. Review upstream choice and retention. If you expose an encrypted resolver endpoint, make its access policy as deliberate as the ordinary DNS port.

## Choose the resolver chain before opening a port

A useful private design is a VPN client querying AdGuard Home, with AdGuard forwarding to Unbound on loopback. Unbound then performs recursion; AdGuard adds filtering and a management interface. Alternatively use only Unbound for a smaller stack. Give each listener a distinct address/port and draw the forwarding direction: sending Unbound back to AdGuard creates a loop. Decide which private clients may use the service before publishing anything.

- Keep public inbound TCP and UDP 53 closed unless there is a specific authorised-client policy.

- Give the filtering interface and DNS listener separate access rules.

- Check port ownership before installation; an existing system resolver may already bind the intended address.

Official documentation: [AdGuard Home setup](https://github.com/AdguardTeam/AdGuardHome/wiki/Getting-Started)

## A loopback Unbound starting point

On a system with Unbound already installed, the following fragment illustrates a backend reachable only on the host. Integrate it with the distribution configuration rather than overwriting package settings or trust-anchor management. The high port lets another DNS frontend use port 53. Validate the complete effective file, then reload through the installed service manager. A remote client needs a separately controlled tunnel or frontend; this fragment intentionally creates no public resolver.

```
server:
interface: 127.0.0.1
port: 5335
access-control: 127.0.0.0/8 allow
access-control: 0.0.0.0/0 refuse
access-control: ::0/0 refuse

# Validate the complete installed configuration:
unbound-checkconf
```

Official documentation: [Unbound configuration reference](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html)

## Run an acceptance checklist from two networks

First query the backend locally, then the normal client path. Check ordinary A/AAAA records, a deliberately nonexistent name and DNSSEC validation using a documented test domain. Repeat from a machine outside the permitted subnet: it must not receive recursion. Review whether a browser uses its own encrypted resolver and bypasses the configured device DNS. Keep a temporary independent resolver available during the change so a DNS mistake does not remove your administration route.

- Local diagnostic: dig @127.0.0.1 -p 5335 example.org A

- Inspect both UDP and TCP reachability, plus IPv6 listeners.

- Confirm filtering exceptions and record only the diagnostics actually needed.

## Diagnose timeouts, loops and validation failures

A frontend timeout with a working local backend suggests the frontend address, firewall or forwarding target. Repeated self-directed queries suggest a loop. Widespread DNSSEC failures can involve incorrect system time or trust-anchor maintenance; fix the cause rather than leaving validation disabled. If only large replies fail, investigate TCP fallback and the network path. Keep query logging temporary, and test a restart and configuration restore before making the resolver a dependency for every device.

KEEP EXPLORING

## Continue reading.

[Network ### A network should explain itself. Understand the Nordic region choices, the difference between a port speed and real throughput, and what evidence a hosting network…](https://koalavps.com/network/)[Legal ### Privacy policy — fewer records, clear reasons. Understand account, payment and technical records, why they may be needed and which questions to ask about access and retention. T…](https://koalavps.com/privacy/)[Guides ### A private tunnel with a clear purpose. WireGuard can connect your devices to a server or private network. Its benefits depend on correct routing, DNS and endpoint securi…](https://koalavps.com/guides-wireguard-vpn-on-a-vps/)

CONFIGURE YOUR INFRASTRUCTURE

## Take control. Deploy on your terms.

No identity paperwork. Full administrator access. Crypto-native billing.

[Select a configuration](https://koalavps.com/vps/)
