-4

As I understood, in order to make a connection to an internal IP (behind NAT), the computer behind the internal IP have to send the request first before the other side will be able to answer it, So if 2 IP's are internal we have a problem because no one can send the request first.

I understood there are few hacks to let 2 internal IP to communicate between each other but my question is:

Does a public IP can simply bridge those 2 internal IP's so they can communicate with each other? like packet forwarding? or piping?

I am investigating the p2p protocol, that is how I got here :)

EDIT: My goal is to establish a direct connection and not just send the data via third party.

1 Answers1

2

What you're talking about, broadly, is called NAT Traversal. RFC 5389 describes the Session Traversal Utilities for NAT (STUN) protocol, which can be used as the basis for a NAT traversal protocol. STUN requires a host with a public IP to facilitate communication, but doesn't result in all the traffic between the endpoints being relayed through the host with the public IP.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331