Hello, this is a general question about how routers rout messages from the WAN to LAN side. I have a 2 PCs connected to my ISP through a router. The router IP is assigned by the ISP and I assume that's the only address obtained from the ISP. The PC's get their addresses assigned by the router. I suppose that when a PC sends a packet out to the ISP, the return address must be the address of the router. Is that correct? If that's so, how does the router know which PC to send the response to?
With outgoing request the router maintains a list of the computer that made the request. It is all a function of Network Address Translation. It translates the public address of the incoming reply to the private address of the computer that made the request.
It is for this reason that when running a server that is receiving unsolicited requests it is necessary to use port forwarding to the computer running the server.
Because of this router by there very nature can offer some protection from hackers because if an unsolicited request arrives that the router hasn't been instructed how to deal with via port forwarding it just discards it.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.