The port has two different meanings. First, one is a port in physical thinking, such as ADSL modems, hubs, switches, interfaces used by routers to connect other network devices, etc.
The second is the port on the network service, which generally refers to the TCP/IP protocol port. If an IP address is like a house, then the port is the door of the house. The IP address is a string of numbers, while the port is only an integer, and the value ranges from 0 to 65535. For example, port 80 is used for browsing web services, and port 21 is used for FTP services, etc.
When computers communicate with each other, there are both sending and receiving. First, after sending the information, it is necessary to confirm whether it has arrived. In this case, the TCP protocol is mainly used. The other is that after sending the information, there is no need to confirm whether the information is delivered. In this case, the UDP protocol is mainly used. The ports that the services correspond to these two protocols are divided into TCP and UDP ports.
The role of ports is to enable applications on computers running different operating systems to communicate with each other and receive information from one place to another. Each port is associated with the host's IP address and communication protocol. Therefore, well-known applications are assigned a known port number among the ports used by the server, and unknown applications are registered with the port number to avoid duplication.
Port number range: 0 - 65535
- Well-known ports: range from 0 to 1023
Ports correspond to protocols that provide specific services. Usually, port 21 is assigned to the FTP service, and port 25 is given to the SMTP (Simple Mail Transfer Protocol) service, and so on. However, some network services do not need to specify a specific port number. For example, the port number of the WWW service is "80" by default.
- Dynamic Ports: range from 1024 to 65535
A dynamic port is generally not assigned a specific service fixedly but is assigned dynamically. For example, when an application process needs network communication, it requests a port from the host, and the host allocates one for its use from the available port numbers. When the cycle ends, the occupied port number is also released. It keeps dynamic ports in a usable "flowing" state.
List of VPN protocols and the port numbers needed to work properly
- PPTP (Point-to-Point Tunneling Protocol) - This protocol uses TCP port 1723. PPTP is commonly used to access Microsoft Remote Access servers.
- IPSec (Internet Protocol Security) - Internet Protocol security uses UDP port 500 and UDP port 4500.
- L2TP (Layer 2 Tunneling Protocol) - The layer 2 tunneling protocol uses various port numbers, TCP port 1701, UDP port 500, and UDP port 4500.
- IKEv2 (Internet Key Exchange) – This protocol uses UDP port 500 and port 4500.
- OpenVPN – This protocol runs on port 1194 UDP and TCP port 443.
- SSTP (Secure Socket Tunneling Protocol) is also known as SSL (Secure Sockets Layer) - this protocol uses TCP port 443. It encrypts data with a private key, another great combination for establishing a secure VPN connection.