Good day. The situation is this: there is a VPS running on a local network and having an external static IP. Server software running on a VPS that exchanges UDP packets with clients. On the local network, everything is working fine. 1) Is it possible to organize the exchange of UDP packets with clients from an external network (for example, with smartphones connected to 3G, which have dynamic IP). Port forwarding from LAN to VCh does not help, because Clients do not have a static external IP. 2) How to organize a server availability check (if it is at all possible for UPD)?
1 answer
1) External clients are most often able to reach the server through NAT. This is not much different from the same TCP.
2) Checking the availability of the server by the client is extremely simple - responding - then available.
3) Note that UDP does not guarantee that the sent packets will reach, and at the same time will reach in the correct order. There is a suspicion that you are inventing TCP.
- 1) Yes, there is no problem from the external to LAN. And if you need the opposite, transfer the package from lokalki to Vneshka? How does NAT know where to send it: - Shach
|