# Failed to configure DNS (Linux)

This error commonly appears on Ubuntu 22. The Defguard client uses `resolvconf` internally to configure DNS servers on the system. The only tested and supported backend is `systemd-resolved`.

Before proceeding, verify that `systemd-resolved` is running:

```sh
systemctl status systemd-resolved
```

### Ubuntu 22

On Ubuntu 23 and later, `resolvconf` is a symbolic link to `resolvectl` by default. On Ubuntu 22 this link does not exist. The straightforward fix is to create it manually:

```sh
sudo ln -s /usr/bin/resolvectl /usr/sbin/resolvconf
```

If that fails, you can also try installing a package that provides the `resolvconf` command, such as `openresolv`. Note that using `openresolv` alongside `systemd-resolved` has not been tested and may cause conflicts — proceed with caution.

### DNS resolution check

If DNS servers are configured in the location but users cannot resolve internal hostnames, check the following:

1. **Routing** — confirm requests to the network segments where your DNS servers reside are routed through the WireGuard interface:

   ```sh
   ip route
   ```
2. **WireGuard allowed IPs** — confirm the DNS server network segments appear in the `allowed ips` list for the peer:

   ```sh
   sudo wg
   ```
3. **Manual resolution test** — try resolving a name directly through one of your internal DNS servers:

   ```sh
   dig @DNS_SERVER_IP my.internal.service.com
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.defguard.net/support-1/troubleshooting-guides/desktop-client/failed-to-configure-dns-linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
