I’ve managed to get OpenVidu Pro up and running with 1x media node and it works great on our LAN.
The instances are behind NAT and have the relevant ports forwarded from the WAN side.
From the Internet, I can access the OpenVidu-call service but joining a call fails as the media node only sees its LAN IPs and doesn’t know it’s NATted. I can see from the logs that when a WAN client joins, it tries all its local IPv4 and v6 addresses but none work.
Is there a way of telling the media node instances what their external IP is?
Many thanks,
James
Hi James,
If your OpenVidu deployment is behind a private network not directly accessible from the Internet, users outside of your netwok will be having trouble connecting to your sessions. Media Nodes will automatically discover their public IP during the negotiation process with clients, by using the STUN/TURN servers.
If the STUN/TURN server is also behind your NAT, as you can imagine they won’t be able to tell Media Nodes which IP an external user could use to establish a connection to it. There’s no way to “force” a public IP address inside Media Nodes.
But if you forward all of the necessary ports, then it should work OK. Actually AWS works just like that: an EC2 instance will get a private network (a NAT), but all of the requited ports are forwarded to the Internet, so connections can be established. So if you forward all of the required ports (not just the “relevant” ones as you stated) it should work fine. Carefully follow the prerrequisites documentation (https://docs.openvidu.io/en/2.14.0/openvidu-pro/deployment/on-premises/#1-prerequisites) and configure your router with all of the ports there stated. Then your OpenVidu Pro deployment should work fine for external users.
Thanks Pablo,
When I used ‘relevant’, I meant all the ports listed by the docs. I’m trying a different NAT configuration today to try and resolve it and will report back!
Thanks again for the information!
Cheers,
James
1 Like
Hi Pablo,
I switched from port forwarding NAT to 1:1 NAT on the master and node and it now works! Seems the media node finds it easier to establish its IP now.
Thank you,
James