You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deployment/deploying-on-premises.md
+33-23
Original file line number
Diff line number
Diff line change
@@ -35,33 +35,22 @@ This procedure installs the following services:
35
35
36
36
-**[Install Docker Compose](https://docs.docker.com/compose/install/){:target="_blank"}**. NOTE: install docker-compose from the link (official Docker site) as minimum version `1.24` is required.
37
37
38
-
-**Opened ports in the server**
38
+
-**Configure a domain name**: OpenVidu is deployed using HTTPS because it is mandatory to use WebRTC. Then, if you do not have a domain name, an autogenerated SSL certificate will be used and an ugly warning will appear to your users when enter to your site. And of course you can suffer a man-in-the-middle attack. So it is recommended that you configure a domain name pointing to your machine's public IP. A valid SSL certificate can be automatically generated using Let's Encrypt in the installation process. If you already have a valid SSL certificate of your own, it also can be configured.
39
39
40
-
-**22 TCP**: to connect using SSH to admin OpenVidu.
41
-
-**80 TCP**: if you select Let's Encrypt to generate an SSL certificate this port is used by the generation process.
42
-
-**443 TCP**: OpenVidu server and application are published in standard https port.
43
-
-**3478 TCP+UDP**: used by TURN server to resolve clients IPs.
44
-
-**40000 - 57000 TCP+UDP**: used by Kurento Media Server to establish media connections.
45
-
-**57001 - 65535 TCP+UDP**: used by TURN server to establish relayed media connections.<br><br>
40
+
-**Port configuration in the server**
46
41
47
-
Please take care to close ports not mentioned above to block access to some of the internal services of OpenVidu platform (like Redis). For example, you can configure public/private ports in any cloud platform ([OpenStak security groups](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html#), [AWS security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html), etc..) or installing [UFW](https://manpages.ubuntu.com/manpages/bionic/en/man8/ufw.8.html) with the following configuration:
42
+
-**Open these ports** (in section [Close ports to avoid external attacks](#close-ports-to-avoid-external-attacks) you have an UFW sample to configure a firewall)
48
43
49
-
```
50
-
ufw allow ssh
51
-
ufw allow 80/tcp
52
-
ufw allow 443/tcp
53
-
ufw allow 3478/tcp
54
-
ufw allow 3478/udp
55
-
ufw allow 40000:57000/tcp
56
-
ufw allow 40000:57000/udp
57
-
ufw allow 57001:65535/tcp
58
-
ufw allow 57001:65535/udp
59
-
ufw enable
60
-
```
44
+
- **22 TCP**: to connect using SSH to admin OpenVidu.
45
+
- **80 TCP**: if you select Let's Encrypt to generate an SSL certificate this port is used by the generation process.
46
+
- **443 TCP**: OpenVidu server and application are published by default in standard https port.
47
+
- **3478 TCP+UDP**: used by TURN server to resolve clients IPs.
48
+
- **40000 - 57000 TCP+UDP**: used by Kurento Media Server to establish media connections.
49
+
- **57001 - 65535 TCP+UDP**: used by TURN server to establish relayed media connections.<br><br>
61
50
62
-
-**Configure a domain name**: OpenVidu is deployed using HTTPS because it is mandatory to use WebRTC. Then, if you do not have a domain name, an autogenerated SSL certificate will be used and an ugly warning will appear to your users when enter to your site. And of course you can suffer a man-in-the-middle attack. So it is recommeded that you configure a domain name pointing to your machine's public IP. A valid SSL certificate can be automatically generated using Let's Encrypt in the installation process. If you already have a valid SSL certificate of your own, it also can be configured.
51
+
-**Close all other ports**: this is VERY important to avoid external attacks to OpenVidu internal services. Check troubleshooting section [Close ports to avoid external attacks](#close-ports-to-avoid-external-attacks)to learn more about this.
63
52
64
-
-**Free ports**: OpenVidu platform services will need the following ports to be available in the machine: 80, 443, 3478, 5442, 5443, 6379 and 8888. If some of these ports is used by any process, OpenVidu platform won't work correctly. It is a typical error to have an NGINX process in the system before installing OpenVidu. Please uninstall it.
53
+
-**Free ports inside the server**: OpenVidu platform services will need the following ports to be available in the machine: 80, 443, 3478, 5442, 5443, 6379 and 8888. If some of these ports is used by any process, OpenVidu platform won't work correctly. It is a typical error to have an NGINX process in the system before installing OpenVidu. Please uninstall it.
By default, the [OpenVidu Call](demos/openvidu-call/){:target="_blank"} application is deployed alongside OpenVidu Platform. It is accessible in the URL:
161
150
162
151
```console
163
-
https://openvidu_domain_or_public_ip/
152
+
https://OPENVIDU_DOMAIN_OR_PUBLIC_IP/
164
153
```
165
154
166
155
This application is defined in file `docker-compose.override.yml`. To disable OpenVidu Call application, you can delete the file `docker-compose.override.yml` (or just rename it in case you want to enable it again in the future).
@@ -353,6 +342,27 @@ To change the level of Kurento Media Server logs (***kms*** docker service) chan
353
342
354
343
OpenVidu and Kurento Media Server evolve at a different pace. Sometimes, it is possible that a new KMS is released but OpenVidu is not still updated. In that case, if you hit a bug that might be solved in the last KMS version, you can test if just updating KMS fixes your issue. `KMS_IMAGE` property allows you to specify the new KMS image in configuration file `.env`.
355
344
345
+
### Close ports to avoid external attacks
346
+
347
+
Closing all non-necessary ports in your server is very important to avoid external attacks. Some administrators using OpenVidu have reported attacks because their ports weren't properly closed. Of course, all of the opened ports stated in [Prerequisites](#1-prerequisites) section must be accessible from the exterior, but the rest must be closed to grant proper protection.
348
+
349
+
Typically, cloud providers initiate their machines with all ports closed by default, so usually it is only necessary to open the required ones. For example, you can configure public/private ports in in OpenStack with [OpenStack security groups](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html#){:target="_blank"}, in AWS with [AWS security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html){:target="_blank"}, etc...
350
+
351
+
If your only choice is to manually configure a firewall, you can for example install in any GNU/LInux system the great [UFW (Uncomplicated Firewall)](https://manpages.ubuntu.com/manpages/bionic/en/man8/ufw.8.html){:target="_blank"} (`sudo apt install ufw`) with the following configuration to only allow the required ports:
0 commit comments