user2288650
user2288650

Reputation: 450

Webrtc Getting blocked by Firewall (iceConnection:Failed)

I have simple web app,

  1. Client1 logs in and socket connections is made to signal.php
  2. Client2 logs in and socket connections is made to signal.php again
  3. Client2 sends offer to client1 via signal.php
  4. client1 sends answe to client2
  5. ice candidiates are exchanged

So this works fine when the remote system's windows firewall is Off but when the firewall is On the ice connection fails after ice candidates are gathered.

I am using xirsys Turn/Stun servers. I have tried to find a way to find a way to make sure my app runs even if firewall is On. I have seen other webrtc example which do no get blocked by firewall. What am I missing here ?????

UPDATE

Did some more testing with following results

Does not matter if Firewall is On or Off on the client making connection. If the Firwall is On who is getting the Offer the connections fails

Example: Consider client 1 is making the offer and client 2 is receiving the offer. If client 2 has firwall On, the connection fails. If firewall is Off the connection is etablished. Does not matter if client 1 has its firewall On or Off. If client 1 and 2 or on same computer, the connections is always sucessful.

Upvotes: 0

Views: 3168

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17350

You need to compare the types of TURN servers used by your app which does not work with the ones that work. chrome://webrtc-internals shows the servers.

  • do you use TURN/TCP and TURN/TLS?
  • on which ports do the the TURN servers run?
  • for the working service, what kind of connection is used (see here for how to determine this)

And there are cases where the connection will fail. Your UX needs to deal with those too.

Upvotes: 0

Related Questions