-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is a refactoring of the initial effort in order to make i…
…t work as a standalone role. It includes the following changes: * bring it up to date with the official documentation * make it work on Ubuntu 20.04 and Centos 8 * move some config from the override file to the config file * make tls stuff more configurable and usable without letsencrypt * change dh-params from auto-generated to the recommended file from https://ssl-config.mozilla.org/ffdhe2048.txt * remove superfluous tasks * add firewall configurations for ubuntu and centos * flesh out readme
- Loading branch information
Showing
11 changed files
with
206 additions
and
83 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
# ansible-role-coturn | ||
# Set up a TURN/STUN server for [BigBlueButton](https://bigbluebutton.org/) | ||
|
||
This is an ansible-role to set up [coturn](https://github.com/coturn/coturn) and largely follows the [official BigBlueButton documentation](https://docs.bigbluebutton.org/admin/setup-turn-server.html). | ||
|
||
## Setup | ||
|
||
The role works on Ubuntu 20.04 and Centos 8. | ||
You should carefully look through the [defaults](defaults/main.yml) to see which variables you need to set. | ||
For most parts, the default values of the coturn configuration should already be optimal for use with BigBlueButton. | ||
But pay particular attention to the following: | ||
|
||
* You need to set `coturn_static_auth_secret` to the same secret you specified in your BigBlueButton setup. | ||
* `coturn_realm`, althoug optional, should be set (often to you domain name). | ||
* You _really should_ configure **TLS**. When you do so, coturn needs access to your certificate files. | ||
This is why you need to specify their directory and the cert- and key-files. | ||
In practice, this means that you usually set up your tls certificates _before_ running the coturn role. | ||
If you have a special tls user group, you can optionally set it as well. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-----BEGIN DH PARAMETERS----- | ||
MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz | ||
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a | ||
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7 | ||
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi | ||
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD | ||
ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg== | ||
-----END DH PARAMETERS----- |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Service] | ||
LimitNOFILE=1048576 | ||
AmbientCapabilities=CAP_NET_BIND_SERVICE | ||
ExecStart= | ||
ExecStart=/usr/bin/turnserver --daemon -c /etc/turnserver.conf | ||
Restart=always |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
--- | ||
|
||
- name: systemd daemon-reload | ||
systemd: | ||
daemon_reload: yes | ||
|
||
- name: restart coturn | ||
service: | ||
name: coturn | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
|
||
- name: firewalld enable coturn standard ports | ||
firewalld: | ||
port: "{{ item.port }}/{{ item.proto }}" | ||
permanent: yes | ||
state: enabled | ||
loop: | ||
- port: "{{ coturn_listening_port }}" | ||
proto: tcp | ||
- port: "{{ coturn_listening_port }}" | ||
proto: udp | ||
- port: "{{ coturn_min_port }}-{{ coturn_max_port }}" | ||
proto: udp | ||
|
||
- name: firewalld enable coturn tls ports | ||
firewalld: | ||
port: item | ||
permanent: yes | ||
state: enabled | ||
loop: | ||
- "{{ coturn_tls_listening_port }}/tcp" | ||
- "{{ coturn_tls_listening_port }}/udp" | ||
when: coturn_use_tls |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
|
||
- name: install dependencies | ||
apt: | ||
update_cache: true | ||
name: ufw | ||
|
||
- name: ufw allow known services | ||
ufw: | ||
rule: allow | ||
name: OpenSSH | ||
|
||
- name: ufw allow coturn standard ports | ||
ufw: | ||
rule: allow | ||
port: "{{ item.port }}" | ||
proto: "{{ item.proto }}" | ||
loop: | ||
- port: "{{ coturn_listening_port }}" | ||
proto: tcp | ||
- port: "{{ coturn_listening_port }}" | ||
proto: udp | ||
- port: "{{ coturn_min_port }}:{{ coturn_max_port }}" | ||
proto: udp | ||
|
||
- name: ufw allow coturn tls port | ||
ufw: | ||
rule: allow | ||
port: "{{ item.port }}" | ||
proto: "{{ item.proto }}" | ||
loop: | ||
- port: "{{ coturn_tls_listening_port }}" | ||
proto: tcp | ||
- port: "{{ coturn_tls_listening_port }}" | ||
proto: udp | ||
when: coturn_use_tls | ||
|
||
- name: enable firewall | ||
ufw: | ||
state: enabled | ||
policy: reject | ||
logging: off |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.