summaryrefslogtreecommitdiff
path: root/roles/network/coredns/templates/coredns.service.j2
blob: 327f930b7431f5e83a00c3ab586b8fdbaa0ffa44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[Unit]
Description=Coredns
After=network-online.target
Wants=network-online.target

[Service]
Restart=always
User=coredns
ExecStart=/usr/bin/coredns -conf /etc/coredns/Corefile
ExecReload=/bin/kill -USR1 $MAINPID

# systemd hardening-options
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
DeviceAllow=/dev/null rw
DevicePolicy=strict
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateTmp=true
ProtectControlGroups=true
ProtectHome=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
RemoveIPC=true
RestrictNamespaces=true
RestrictRealtime=true
SystemCallArchitectures=native

[Install]
WantedBy=multi-user.target