Network Address Translation (NAT) causes well-known difficulties for peer-to-peer (P2P) communication, since the peers involved may not be reachable at any globally valid IP address.
Graham Wihlidal "There is no such thing as the “perfect networking code”, due to the Internet’s unreliability, but there are a few tricks you can use to improve it to the point where the illusion can hold."