The current IP configuration, set as DOMAIN_OR_PUBLIC_IP
that you have, only users within your intranet are able to access OpenVidu. Users outside the network will be unable to connect, even if a Public IP is used.
To address this, consider the following two options:
Option 1: (Easiest)
Create a VPN, allowing users outside your network to connect to your network via the VPN.
Option 2:
Deploy OpenVidu with DOMAIN_OR_PUBLIC_IP
using a domain that is accessible both from the intranet and the public.
For this second option, you’ll need to associate the domain name in your internal network with the private IP, enabling users to connect to your Apache server via its 192.168.13.197
. Additionally, configure a public domain name identical to the private one, pointing it to the public IP of your Apache server. Your Apache server should proxy based on that domain to OpenVidu Server.
One potential issue you might encounter is related to WebRTC connectivity. Depending on your Apache Server configuration, it may not be set up to proxy the TURN protocol, which is exposed at port 3478 of the OpenVidu Server.
Also, you might need to configure your Apache Server to proxy at the transport level (layer 4). For example, here’s a case of Coturn and an API operating behind a Nginx server with two domains, one for the API and another for TURN: Run coTurn behind Nginx - DEV Community
In summary, for option 2 you need:
- A domain name,
openvidu.example.io
, which resolves to your Apache server 192.168.13.197
within your network and from the public internet.
- Another domain name
coturn.example.io
which resolves to your Apache server 192.168.13.197
in your internal network and to the public IP of your Apache Server from the public internet.
- Adapt the nginx config of this tutorial and apply it to your apache server: Run coTurn behind Nginx - DEV Community
- Add an environment variable to allow clients to reach Coturn through its domain:
OPENVIDU_WEBRTC_ICE_SERVERS=["url=turns:coturn.example.io:443,staticAuthSecret=<TURN_STATIC_AUTH_SECRET>"]
You can find the TURN_STATIC_AUTH_SECRET
at /opt/openvidu/coturn/shared-secret-key
.
Please note that even with these configurations, I cannot guarantee success, as I have not tested this particular setup. However, this is a good starting point for troubleshooting.