Why server requires open ports on an access modem but the client does not?

1

I had this doubt as to how I was thinking of creating a chat for direct communication between two computers whether local or remote. This will be my first study project in which I apply network communication. So I realized that to create a server it is necessary to open ports on the internet access modem, but for the client to communicate not. Why?

    
asked by anonymous 14.05.2017 / 01:04

1 answer

3

The client does not receive requests, it only issues them. The server receives requests, so this must be allowed. If you allowed all ports you would have a large area of attack through exploit requests.

Actually it is not that you have to open the doors to the client, they are all open, you do not have to close out doors unless you do not trust what is running on the machine, but there open door is the smallest problem .

It's like a show, a closed party, in an event, there is control of who enters, not who leaves. Everyone can leave, only those who have permission can enter.

Of course, every client can be a server, too. In point-to-point communications are so. Of course, point to point must always know the address of the point to start communication.

The initial communication request needs the open port, but then this is no longer a problem in most architectures since the connection can be kept open, there it looks like two clients communicating.

    
14.05.2017 / 01:18