summarylogtreecommitdiffstats
path: root/dns01proxy.service
blob: 7f5c1abf8eafac68b98469b25fdf9b4ceb062ad5 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[Unit]
Description=ACME DNS-01 proxy server
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=14400
StartLimitBurst=10

[Service]
Type=notify
User=dns01proxy
Group=dns01proxy
Environment=XDG_DATA_HOME=/var/lib/dns01proxy
Environment=XDG_CONFIG_HOME=/etc
EnvironmentFile=/etc/dns01proxy/env.conf
ExecStart=/usr/bin/dns01proxy run --config /etc/dns01proxy/dns01proxy.toml
ExecReload=/bin/kill -HUP $MAINPID

# Do not allow the process to be restarted in a tight loop. If the process
# fails to start, something critical needs to be fixed.
Restart=on-abnormal

# Use graceful shutdown with a reasonable timeout.
TimeoutStopSec=5s

LimitNOFILE=1048576
LimitNPROC=512

# Hardening options.
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
DevicePolicy=closed
LockPersonality=true
MemoryAccounting=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProcSubset=pid
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectProc=invisible
ProtectSystem=strict
RemoveIPC=true
ReadWritePaths=/var/lib/dns01proxy
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true

[Install]
WantedBy=multi-user.target