Che cosa sono le porte? [chiuso]

-2

Volevo solo sapere quali sono le porte. Qualcuno può spiegarmi cos'è una porta?

    
posta Nithin Jose 07.07.2013 - 13:23
fonte

3 risposte

6

Nel network computing, una porta è un sottoindirizzo. È come un numero di camera in un hotel: l'hotel ha un indirizzo (ad esempio, 42 Washington Street, Austin, Texas) ed è esso stesso suddiviso in stanze, ognuna con il proprio numero (ad esempio la stanza 317). Se vuoi raggiungere una stanza specifica, devi conoscere sia l'indirizzo (in modo che tu possa trovare l'hotel) sia il numero della camera (perché l'hotel ha più camere).

Allo stesso modo, quando una macchina A su Internet vuole parlare con un'altra macchina B su Internet, prova ad aprire un TCP connessione a B su una porta specifica : la connessione è contrassegnata sia da indirizzo IP di B e un numero di porta. Le porte consentono a tale macchina "B" di mantenere contemporaneamente diversi servizi distinti: ad esempio, B sarà sia un server Web, che prevede connessioni sulla porta 80, sia un server di posta elettronica, in attesa di connessioni sulla porta 25. Quando alcuni client aprono una connessione a B, B saprà a quale servizio la connessione è mirata grazie alla porta: se la connessione è per la porta 80, è Web; se è per la porta 25, è Email.

    
risposta data 07.07.2013 - 13:36
fonte
4

Le porte sono un concetto, espresso come un numero, che consente a un servizio (programma) su un computer di connettersi e scambiare il traffico con un particolare servizio su un altro computer.

Molti servizi utilizzano convenzionalmente numeri di porta ben definiti, ad esempio un server Web utilizza e ascolta sulla porta 80 per il traffico http e la porta 443 per il traffico https. I numeri di porta inferiori a 1024 sono considerati "speciali" in quanto un programma richiede autorizzazioni elevate per utilizzarli. Qualsiasi porta su cui è in ascolto un servizio è potenzialmente vulnerabile agli attacchi se il servizio di ascolto del traffico sulla porta non è progettato con una certa attenzione.

Ad esempio, il servizio potrebbe comportarsi in modo anomalo se riceve troppe connessioni e / o traffico a una velocità superiore a quella che può gestire. I servizi spesso si aspettano che il traffico si conformi a un insieme limitato di dati e potrebbero comportarsi in modo anomalo se i dati inviati non sanno come gestirli. L'inondazione con il traffico può causare un Denial of Service, in cui non è possibile ricevere ulteriori connessioni e potenzialmente causare il blocco della macchina e il riavvio o il ciclo di spegnimento.

A seconda dei privilegi del servizio, il comportamento anomalo potrebbe anche significare che un utente malintenzionato può eseguire operazioni sul computer che non dovrebbero essere in grado di eseguire, il che potrebbe rappresentare un rischio per la sicurezza.

In un tentativo di sicurezza, alcuni servizi potrebbero iniziare a utilizzare numeri di porta non convenzionali sulla base del fatto che un hacker non potrebbe sapere immediatamente quale servizio stava ascoltando sulla porta, tuttavia i servizi spesso identificano cosa sono quando sono connessi a e altri possono essere identificati dal comportamento quando vengono inviati i dati, questo è debole. Una migliore pratica di sicurezza richiede che l'accesso alle porte sia limitato solo ai computer che hanno bisogno di accedere a tali servizi.

    
risposta data 07.07.2013 - 13:37
fonte
3

Ci sono porte Phyiscal e Virtual.

Le porte di rete fisiche consentono di collegare i cavi ai computer, ad esempio:

  • Seriale
  • Ethernet
  • Fibra
  • ...

Esiste anche il concetto di porte virtuali, su cui probabilmente stai pensando. Se trovi un buon tutorial qui in dettaglio i concetti di base del networking.

As you know every computer or device on the Internet must have a unique number assigned to it called the IP address. This IP address is used to recognize your particular computer out of the millions of other computers connected to the Internet. When information is sent over the Internet to your computer how does your computer accept that information? It accepts that information by using TCP or UDP ports.

An easy way to understand ports is to imagine your IP address is a cable box and the ports are the different channels on that cable box. The cable company knows how to send cable to your cable box based upon a unique serial number associated with that box (IP Address), and then you receive the individual shows on different channels (Ports).

Ports work the same way. You have an IP address, and then many ports on that IP address. When I say many, I mean many. You can have a total of 65,535 TCP Ports and another 65,535 UDP ports. When a program on your computer sends or receives data over the Internet it sends that data to an ip address and a specific port on the remote computer, and receives the data on a usually random port on its own computer. If it uses the TCP protocol to send and receive the data then it will connect and bind itself to a TCP port. If it uses the UDP protocol to send and receive data, it will use a UDP port. Figure 1, below, is a represenation of an IP address split into its many TCP and UDP ports. Note that once an application binds itself to a particular port, that port can not be used by any other application. It is first come, first served.

This all probably still feels confusing to you, and there is nothing wrong with that, as this is a complicated concept to grasp. Therefore, I will give you an example of how this works in real life so you can have a better understanding. We will use web servers in our example as you all know that a web server is a computer running an application that allows other computers to connect to it and retrieve the web pages stored there.

In order for a web server to accept connections from remote computers, such as yourself, it must bind the web server application to a local port. It will then use this port to listen for and accept connections from remote computers. Web servers typically bind to the TCP port 80, which is what the http protocol uses by default, and then will wait and listen for connections from remote devices. Once a device is connected, it will send the requested web pages to the remote device, and when done disconnect the connection.

On the other hand, if you are the remote user connecting to a web server it would work in reverse. Your web browser would pick a random TCP port from a certain range of port numbers, and attempt to connect to port 80 on the IP address of the web server. When the connection is established, the web browser will send the request for a particular web page and receive it from the web server. Then both computers will disconnect the connection.

Now, what if you wanted to run an FTP server, which is a server that allows you to transfer and receive files from remote computers, on the same web server. FTP servers use TCP ports 20 and 21 to send and receive information, so you won't have any conflicts with the web server running on TCP port 80. Therefore, the FTP server application when it starts will bind itself to TCP ports 20 and 21, and wait for connections in order to send and receive data.

Most major applications have a specific port that they listen on and they register this information with an organization called IANA. You can see a list of applications and the ports they use at the IANA Registry. With developers registering the ports their applications use with IANA, the chances of two programs attempting to use the same port, and therefore causing a conflict, will be diminished.

    
risposta data 07.07.2013 - 13:42
fonte

Leggi altre domande sui tag