| 1 |
[Unit] |
| 2 |
Description = dnss daemon - DNS over HTTPS mode |
| 3 |
|
| 4 |
# Note we get the sockets via systemd, see dnss.socket. |
| 5 |
Requires=dnss.socket |
| 6 |
|
| 7 |
[Service] |
| 8 |
ExecStart=/usr/local/bin/dnss \ |
| 9 |
--dns_listen_addr=systemd \ |
| 10 |
--monitoring_listen_addr=127.0.0.1:8081 \ |
| 11 |
--enable_dns_to_https |
| 12 |
|
| 13 |
|
| 14 |
Type = simple |
| 15 |
Restart = always |
| 16 |
|
| 17 |
# Use a dynamic user, since dnss doesn't use any persistent storage anyway. |
| 18 |
DynamicUser = true |
| 19 |
User = dnss |
| 20 |
Group = dnss |
| 21 |
|
| 22 |
# Some security measures to reduce unnecessary exposure, just in case. |
| 23 |
CapabilityBoundingSet = |
| 24 |
ProtectSystem = strict |
| 25 |
PrivateUsers = true |
| 26 |
PrivateDevices = true |
| 27 |
RestrictNamespaces = true |
| 28 |
ProtectControlGroups = yes |
| 29 |
ProtectProc = invisible |
| 30 |
ProcSubset = pid |
| 31 |
SystemCallArchitectures = native |
| 32 |
SystemCallFilter = @system-service |
| 33 |
ProtectKernelModules = yes |
| 34 |
ProtectKernelTunables = yes |
| 35 |
|
| 36 |
|
| 37 |
[Install] |
| 38 |
Also=dnss.socket |
| 39 |
WantedBy = multi-user.target |
| 40 |
|