2020-04-11 15:08:03 +02:00
|
|
|
[Unit]
|
|
|
|
Description=STUN and TURN relay server for VoIP and WebRTC
|
|
|
|
Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1)
|
|
|
|
After=syslog.target network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=coturn
|
|
|
|
Group=coturn
|
2020-12-29 17:21:36 +01:00
|
|
|
Type=simple
|
2020-05-04 15:08:12 +02:00
|
|
|
EnvironmentFile=-/etc/sysconfig/coturn
|
2020-04-11 15:08:03 +02:00
|
|
|
PIDFile=/run/coturn/turnserver.pid
|
2020-12-29 17:21:36 +01:00
|
|
|
ExecStart=/usr/bin/turnserver -c /etc/coturn/turnserver.conf --pidfile /run/coturn/turnserver.pid $EXTRA_OPTIONS
|
2020-04-11 15:08:03 +02:00
|
|
|
Restart=on-abort
|
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
|
|
|
2020-12-29 17:21:36 +01:00
|
|
|
# next lines allow coturn to bind to a port below 1024
|
|
|
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
2020-06-30 10:03:55 +02:00
|
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
2020-05-04 15:08:12 +02:00
|
|
|
|
2020-04-11 15:08:03 +02:00
|
|
|
LimitCORE=infinity
|
|
|
|
LimitNOFILE=999999
|
|
|
|
LimitNPROC=60000
|
|
|
|
LimitRTPRIO=infinity
|
|
|
|
LimitRTTIME=7000000
|
|
|
|
CPUSchedulingPolicy=other
|
|
|
|
UMask=0007
|
|
|
|
|
2020-12-29 17:21:36 +01:00
|
|
|
# various hardening options
|
|
|
|
LockPersonality=yes
|
|
|
|
MemoryDenyWriteExecute=yes
|
|
|
|
MountFlags=private
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
PrivateDevices=yes
|
|
|
|
PrivateTmp=yes
|
|
|
|
ProtectClock=yes
|
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectHome=yes
|
|
|
|
ProtectHostname=yes
|
|
|
|
ProtectKernelLogs=yes
|
|
|
|
ProtectKernelModules=yes
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
ProtectSystem=full
|
|
|
|
RemoveIPC=yes
|
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
|
|
|
RestrictNamespaces=yes
|
|
|
|
RestrictSUIDSGID=yes
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @swap @privileged @resources @cpu-emulation @obsolete
|
|
|
|
|
2020-04-11 15:08:03 +02:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|