This means that your NaT is Symetric, and if your NaT is Symetric, it gives different external ports for each connection. And it is impossible to connect the hole on both sides, but you can still connect p2p. But it is only possible if the intermediary side uses Nat. Find it.
But if in two places where Symetric NaT is used, there is no way to connect a p2p connection with Udp Hole Punching.
- a: Symetric => b: symetric ---- impossible
- a: Conic => b: Conic ------------ possibly easy
- a: Symetric => b: Coinc --------- possible / only one-way handshake 4: a: Conic => b: symetric --------- impossible / but it is possible to connect a one-way handshake
But you can still use port prediction methods. this means that you have to guess which port can be used in communication and try to connect it (Tcp Hole Punch)
For Conic NaT, you can learn about punching UDP holes. Please check the sample at https://github.com/turapulku/NaT-Traversal-UDP-Hole-punch.git
It is still developing, but for now I hope it will be useful
source share