Browse Source

Tweaking coturn service, removing TCP and fixing TLS (enforcing >TLS1.2)

master
Miguel Gagliardo 6 months ago
parent
commit
2b11e01506
3 changed files with 24 additions and 5 deletions
  1. 2
    3
      matrix/config/turnserver.conf
  2. 16
    0
      matrix/coturn.service
  3. 6
    2
      matrix/install.sh

+ 2
- 3
matrix/config/turnserver.conf View File

746
 
746
 
747
 # Do not allow an TLS/DTLS version of protocol
747
 # Do not allow an TLS/DTLS version of protocol
748
 #
748
 #
749
-#no-tlsv1
750
-#no-tlsv1_1
751
-#no-tlsv1_2
749
+no-tlsv1
750
+no-tlsv1_1

+ 16
- 0
matrix/coturn.service View File

1
+[Unit]
2
+Description=coTURN STUN/TURN Server
3
+Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1)
4
+After=network.target
5
+
6
+[Service]
7
+User=root
8
+Group=root
9
+Type=notify
10
+ExecStart=/usr/bin/turnserver -c /etc/turnserver.conf --pidfile=
11
+Restart=on-failure
12
+InaccessibleDirectories=/home
13
+PrivateTmp=yes
14
+
15
+[Install]
16
+WantedBy=multi-user.target

+ 6
- 2
matrix/install.sh View File

32
 ufw allow 8448/tcp
32
 ufw allow 8448/tcp
33
 
33
 
34
 # Coturn Ports
34
 # Coturn Ports
35
-ufw allow 3478/tcp
36
-ufw allow 5443/tcp
35
+ufw allow 3478/udp
36
+ufw allow 5443/udp
37
 ufw allow 49152:65535/udp
37
 ufw allow 49152:65535/udp
38
 
38
 
39
 # Enable firewall
39
 # Enable firewall
54
 sed -i "s|EXTERNAL_IP|${EXTERNAL_IP}|g" /etc/turnserver.conf
54
 sed -i "s|EXTERNAL_IP|${EXTERNAL_IP}|g" /etc/turnserver.conf
55
 sed -i "s|STATIC_SECRET|${TURN_STATIC_SECRET}|g" /etc/turnserver.conf
55
 sed -i "s|STATIC_SECRET|${TURN_STATIC_SECRET}|g" /etc/turnserver.conf
56
 
56
 
57
+# Custom coturn SystemD service file to allow coturn access to Letsencrypt SSL certs
58
+cp "${BASE_DIR}/coturn.service" /lib/systemd/system/coturn.service
59
+systemctl daemon-reload
60
+
57
 # Add Docker's official GPG key
61
 # Add Docker's official GPG key
58
 echo -e "Install docker\n"
62
 echo -e "Install docker\n"
59
 
63
 

Loading…
Cancel
Save