Created
May 17, 2016 18:55
-
-
Save gtank/f6a8f99c70f682cd8d4acd6a4a9ee696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /usr/lib/systemd/system/tor.service | |
[Unit] | |
Description=Anonymizing overlay network for TCP | |
After=syslog.target network.target nss-lookup.target | |
PartOf=tor-master.service | |
ReloadPropagatedFrom=tor-master.service | |
[Service] | |
Type=notify | |
NotifyAccess=all | |
ExecStartPre=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config | |
ExecStart=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc | |
ExecReload=/bin/kill -HUP ${MAINPID} | |
KillSignal=SIGINT | |
TimeoutSec=30 | |
Restart=on-failure | |
RestartSec=1 | |
WatchdogSec=1m | |
LimitNOFILE=32768 | |
# Hardening | |
PrivateTmp=yes | |
DeviceAllow=/dev/null rw | |
DeviceAllow=/dev/urandom r | |
ProtectHome=yes | |
ProtectSystem=full | |
ReadOnlyDirectories=/run | |
ReadOnlyDirectories=/var | |
ReadWriteDirectories=/run/tor | |
ReadWriteDirectories=/var/lib/tor | |
ReadWriteDirectories=/var/log/tor | |
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE | |
PermissionsStartOnly=yes | |
[Install] | |
WantedBy = multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment