[Unit]
Description=PowerDNS IXFR Distributor
Documentation=man:ixfrdist(1)
Documentation=man:ixfrdist.yml(5)
Documentation=https://doc.powerdns.com
Wants=network-online.target
After=network-online.target time-sync.target

[Service]
Type=simple
ExecStart=@bindir@/ixfrdist
Restart=on-failure
RestartSec=1
StartLimitInterval=0

# Sandboxing
CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID
LockPersonality=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
# Setting PrivateUsers=true prevents us from opening our sockets
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=full
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=~ @clock @debug @module @mount @raw-io @reboot @swap @cpu-emulation @obsolete
ProtectProc=invisible
PrivateIPC=true
RemoveIPC=true
DevicePolicy=closed
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target
