+ 1
How can servers respond to another host that is in NAT?
I have a server and a client (on a local network). They worked pretty well, but I don't understand how the server responds to the host in NAT. For example: the router has a local IP address. 192.x.x.x, but the server has a global ip.
1 Answer
0
When a server needs to respond to a client on a different network behind a NAT (Network Address Translation) gateway, it uses a technique called NAT Traversal. The server keeps track of the client's private internal IP address and port number it sent the request from. While the server needs to send a response, it sends the response packet to the NAT gateway. The NAT gateway, which maintains a NAT translation table, knows which internal client to forward the response to based on the original request's destination address and port.