mirror of
https://git.sr.ht/~hamburghammer/sshlog
synced 2025-01-06 12:17:41 +01:00
42 lines
769 B
SYSTEMD
42 lines
769 B
SYSTEMD
|
[Unit]
|
||
|
Description=SSH Auth Logging
|
||
|
Requires=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
Type=simple
|
||
|
Restart=always
|
||
|
RestartSec=30sec
|
||
|
# Path to the executable
|
||
|
ExecStart=/home/user/go/bin/sshlog -p 2222
|
||
|
KillSignal=SIGTERM
|
||
|
|
||
|
# Stop trying to restart the service if it restarts too many times in a row
|
||
|
StartLimitInterval=5min
|
||
|
StartLimitBurst=4
|
||
|
|
||
|
StandardOutput=journal
|
||
|
StandardError=journal
|
||
|
StandardInput=null
|
||
|
|
||
|
DynamicUser=yes
|
||
|
|
||
|
PrivateTmp=true
|
||
|
PrivateDevices=true
|
||
|
PrivateMounts=true
|
||
|
ProtectSystem=full
|
||
|
#ProtectHome=true
|
||
|
RestrictNamespaces=true
|
||
|
InaccessiblePaths=/run /var /etc
|
||
|
|
||
|
PrivateUsers=true
|
||
|
|
||
|
NoNewPrivileges=true
|
||
|
ProtectKernelTunables=true
|
||
|
ProtectKernelModules=true
|
||
|
ProtectKernelLogs=true
|
||
|
ProtectControlGroups=true
|
||
|
MemoryDenyWriteExecute=true
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|