|Local Private Address
|Remote Public Address
|Router Public Address
|Except the remote public address port 80, local and router ports are randomly chosen.
First, the protocol should be based on UDP. You can do NAT traversal with TCP, but it adds another layer of complexity to an already quite complex problem, and may even require kernel customizations depending on how deep you want to go. We’re going to focus on UDP for the rest of this article.