Question:
I am developing a WebRTC application where one of the peers is a backend server. The application works fine on localhost, with the ICE connection successfully established. However, after deploying my backend server (which includes the signaling service and the peer) to an AWS EC2 instance, the ICE connection never completes.
Things I Have Tried:
- TURN and STUN Servers: I am using TURN and STUN servers provided by metered.ca.
- Ports Configuration: I have opened all necessary UDP and TCP ports on my EC2 instance required for WebRTC.
- I have verified that the TURN and STUN servers are reachable from the EC2 instance.
Observations:
The application works fine on localhost, so the basic implementation seems correct.
The issue arises only when the backend server is deployed to the AWS EC2 instance.
Question: What could be causing the ICE connection to fail on the EC2
instance? Has anyone faced a similar issue, and how
did you resolve it? Any insights or suggestions would be greatly
appreciated!