4

I have been reading about TURN and STUN servers because I would like to develop a browser-to-browser application so that BrowserA (behind a NAT) could communicate with BrowserB (behind a NAT). In this case, I think I should use TURN protocol.

My question: is there any other solution that does NOT require an external phisical server? A just-software solution would be simply perfect.

THANKS

3 Answers3

4

Answer is no.

Explanation: NAT stands for Network Address Translation. It means translation of the 'private' IP of your device which is valid only on the LAN (Local Area Network) into a 'public' IP address which valid on the WAN (i.e., the wild wild part of the Internet that is on the other side of your NAT).

The problem is that the translated address is only visible from outside your LAN. Hence, you need a reachable device out there to read it and sent it back to you (or other peers).

You will always need a server/central peer to help establishing a connection between two peers located behind different NATs when they both have a private IP addresses.

Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
2

http://samy.pl/pwnat/ works without an intermediary but also moving this question to serverfault might help :)

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
1

Thanks. Let's imagine that BrowserA (the one who starts the communication) knows the public IP of BrowserB, but not the other way round. It is the same answer for this question?

  • 1
    Keep in mind that for each connection B makes to a device on the WAN, a different public address may be used. It depends on the NAT's translation policy. The sub-question to your question is how does A know B's public IP? Is it a) through a connection B made to A or b) from another C peers who saw a public translation of B? The answer to your new question is 'yes in most cases'. This subject is discussed in the Practical JXTA II book available online for reading at Scribd. NAT traversal is a complex subject. – Jérôme Verstrynge Mar 24 '11 at 23:16