Skip to content

Conversation

@alexvojproc
Copy link

@alexvojproc alexvojproc commented Oct 18, 2025

This commit hardens the dnsconfd systemd service. dnsconfd and its Unbound backend are often used in security-conscious environments, such as for stable DNS over TLS and local DNSSEC validation. For example, the secureblue project, a derivative of Fedora Atomic, recently switched its users to dnsconfd by default, where we use this hardening as an override.

This is useful if the daemon is compromised somehow, but mostly improves auditabity. Rather than checking the SELinux policy, this gives the sysadmin a quick overview of the daemon's privileges (and for tools like systemd-analyze security).

  • Explicitly cap with no capabilities (already runs as dnsconfd:dnsconfd anyway)
  • Read-only filesystem except for resolv.conf and /run/dnsconfd
  • Removes legacy syscalls and IPC types
  • Reduces unnecessary kernel attack surface
  • Exploit mitigation (W^X, DoS, persistent privilege escalation)

This commit hardens the dnsconfd systemd service. dnsconfd and its Unbound backend
are often used in security-conscious environments, such as for stable DNS over TLS
and local DNSSEC validation. For example, the secureblue project, a derivative of
Fedora Atomic, recently switched its users to dnsconfd by default.

This is useful if the daemon is compromised somehow, but mostly improves auditabity.
Rather than checking the SELinux policy, this gives the sysadmin a quick overview
of the daemon's privileges (and for tools like `systemd-analyze security`).

- Explicitly cap with no capabilities (already runs as `dnsconfd:dnsconfd` anyway)
- Read-only filesystem except for `resolv.conf` and `/run/dnsconfd`
- Removes legacy syscalls and IPC types
- Reduces unnecessary kernel attack surface
- Exploit mitigation (W^X, DoS, persistent privilege escalation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant