]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Document that some capabilities are needed for eBPF
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 2 Jul 2021 13:14:55 +0000 (15:14 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 2 Jul 2021 13:14:55 +0000 (15:14 +0200)
pdns/dnsdistdist/dnsdist.service.in
pdns/dnsdistdist/docs/advanced/ebpf.rst

index 12aadb9c72c949c2b8c2ef9585c7c798a6d79efd..4fdbbb4115d655ede55e358df50bc39a9a11262c 100644 (file)
@@ -22,6 +22,8 @@ LimitNOFILE=16384
 TasksMax=8192
 
 # Sandboxing
+# Note: adding CAP_SYS_ADMIN (or CAP_BPF for Linux >= 5.8) is required to use eBPF support,
+# and CAP_NET_RAW to be able to set the source interface to contact a backend
 CapabilityBoundingSet=CAP_NET_BIND_SERVICE
 AmbientCapabilities=CAP_NET_BIND_SERVICE
 LockPersonality=true
index 2d82845016512a70ffa62a19dca0accd30f96b38..446a52b82def1683fc6d4500e2a925717bc9ecf5 100644 (file)
@@ -1,7 +1,7 @@
 eBPF Socket Filtering
 =====================
 
-:program:`dnsdist` can use `eBPF <http://www.brendangregg.com/ebpf.html>`_ socket filtering on recent Linux kernels (4.1+) built with eBPF support (``CONFIG_BPF``, ``CONFIG_BPF_SYSCALL``, ideally ``CONFIG_BPF_JIT``).
+:program:`dnsdist` can use `eBPF <http://www.brendangregg.com/ebpf.html>`_ socket filtering on recent Linux kernels (4.1+) built with eBPF support (``CONFIG_BPF``, ``CONFIG_BPF_SYSCALL``, ideally ``CONFIG_BPF_JIT``). It requires dnsdist to have the ``CAP_SYS_ADMIN`` capabilities at startup, or the more restrictive ``CAP_BPF`` one since Linux 5.8.
 
 This feature allows dnsdist to ask the kernel to discard incoming packets in kernel-space instead of them being copied to userspace just to be dropped, thus being a lot of faster. The current implementation supports dropping UDP and TCP queries based on the source IP and UDP datagrams on exact DNS names. We have not been able to implement suffix matching yet, due to a limit on the maximum number of EBPF instructions.