blob: d01b9b26114c1448f13c23f70f20b134be123863 (
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
|
[Unit]
Description=Anonymizing overlay network for TCP
After=network.target nss-lookup.target
[Service]
Type=notify
NotifyAccess=all
ExecStartPre=/usr/bin/tor -f /etc/tor/torrc --verify-config
ExecStart=/usr/bin/tor -f /etc/tor/torrc
ExecReload=/bin/kill -HUP ${MAINPID}
KillSignal=SIGINT
TimeoutSec=60
Restart=on-failure
RestartSec=1
WatchdogSec=1m
LimitNOFILE=32768
LimitMEMLOCK=infinity
# Hardening
RuntimeDirectory=tor
RuntimeDirectoryMode=0770
PrivateTmp=yes
PrivateDevices=yes
DeviceAllow=/dev/null rw
DeviceAllow=/dev/urandom r
ProtectHome=yes
ProtectSystem=full
NoNewPrivileges=yes
MemoryDenyWriteExecute=true
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/tor
ReadWriteDirectories=-/var/log/tor
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH CAP_KILL
[Install]
WantedBy=multi-user.target
|