Ports protocols udp and tcp. Network Port Basics

💖 Like it? Share the link with your friends

Port in computer networks is the communication endpoint in the OS. The term is also used for hardware devices, but in software it refers to a logical construct that identifies a particular type of service or process. The port is always associated with the host's IP address or communication protocol type. It completes the session address assignment. A port is identified for each protocol and address by a 16-bit number, also known as the port number. Often specific port numbers are used to define specific services. Of the several thousand listed, 1024 known numbers are protected under a special agreement. They define specific types of services on a host. Protocols that primarily use ports are used to control processes. An example is the TCP transmission control protocol or the User Datagram Protocol of the Internet protocol suite.

Meaning

TCP ports are not needed on direct point-to-point links when computers at each end can only run one program at a time. The need for them arose after these machines were able to execute more than one program at the same time. They were connected to modern packet-switched networks. In the client-server architecture model, ports, applications, and network clients are connected to service initiation. They provide multiplexing services after the initial exchange of information is associated with a port number. It is freed by switching each request service instance to a leased line. Connected to a specific number. Thanks to this, additional customers can be served without any waiting.

Details

The UDP and TCP data transfer protocols are used to indicate the destination port number and source in their segment headers. The port number is an unsigned 16-bit number. It can range from 0 to 65535. TCP ports, however, cannot use the number 0. For UDP, the source port is optional. A value equal to zero means its absence. This process binds input or output channels using a transport protocol, port number, and IP address over an internet socket. This process is also known as bonding. It enables the reception and transmission of information over the network. The operating system network software is used to transmit outgoing data from all application ports to the network. It also forwards incoming network packets by matching the number and IP address. Only one process can bind to a given IP address and port combination using the same transport protocol. Application crashes, also known as conflicts, occur when multiple programs try to communicate with the same port numbers on the same IP address using the same protocol at the same time.

How they apply

It is quite common for applications that implement shared services to use a specially reserved and well-known list of UDP and TCP ports to accept client service requests. This process is also known as listening. It involves receiving a request from a well known port and establishing a conversation between the client and server one to the other using the same local port number. Other clients may continue to connect. This is possible because a TCP connection is identified as a chain that consists of local and remote ports and addresses. Standard UDP and TCP ports may be defined by convention under the control of the IANA or the Internet Assigned Numbers Authority. As a rule, the core of network services, first of all, is World wide web, uses small port numbers, less than 1024. On many operating systems, applications require special privileges to bind to them. For this reason, they are often considered critical to the operation of IP networks. The end client of a connection, on the other hand, tends to use more of them, allocated for short-term use. For this reason, there are so-called ephemeral ports.

Structure

TCP ports are encoded in the packet header of the transport packet. They can be easily interpreted not only by receiving and transmitting PCs, but also by other components of the network infrastructure. Firewalls in particular, they are generally configured to distinguish between packets based on their destination port numbers and their source. A classic example of this is redirection. Attempts to connect in series to a range of ports on the same computer are also known as scans. Such procedures are usually associated either with malicious failure attempts, or with the fact that network administrators are specifically looking for possible vulnerabilities in order to prevent such attacks. Actions aimed at opening a TCP port are recorded and controlled by computers. This technique uses a number of spare connections in order to ensure uninterrupted communication with the server.

Examples of using

A prime example where UDP and TCP ports are heavily used is the Internet mail system. The server is used to work with e-mail. In general, he needs two services. The first service is used for transport by e-mail and from other servers. This is achieved using the Simple Mail Transfer Protocol (SMTP). The SMTP service application typically listens on TCP port number 25 in order to process incoming requests. The other service is POP or IMAP. They are required for email client applications on users' machines in order to receive messages from the server. Email. POP services listen on TCP port 110. All of the above services can run on the same host machine. The port number, when this occurs, distinguishes the service requested by the remote device. If the server's listening port number is defined correctly, this parameter for the client is determined from the dynamic range. Clients and the server individually, in some cases, use certain TCP ports that are assigned by IANA. DHCP is a good example. Here, the client uses UDP 68 anyway, and the server uses UDP 67.

Usage in URLs

Sometimes port numbers are clearly visible on the Internet or on other uniform resource locators, such as URLs. HTTP uses TCP port 80 by default and HTTPS uses port 443. Other variations also exist. For example, the URL http://www.example.com:8080/path indicates that the web browser is connecting to 8080 instead of an HTTP server.

List of UDP and TCP ports

As noted earlier, the IANA, or InternetA ssigned Numbers Authority, is responsible for the global coordination of DNS-Root, IP addressing, and other Internet protocol resources. These procedures include registering commonly used ports for known Internet services. All port numbers are divided among themselves into three ranges: well-known, registered and private or dynamic. Known ports are numbers from 0 to 1023. They are also called system ports. The requirements for new values ​​in this range are more stringent than for other registrations.

Examples

Examples of ports that are on the known list include:

  • TCP 443 port - HTTPS;
  • 21 - File Transfer Protocol;
  • 22-Secure Shell;
  • 25 - simple mail transfer protocol STMP;
  • 53 - DNS domain name system;
  • 119 - Network News Transfer Protocol or NNTP;
  • 80 – HTTP hypertext transfer protocol;
  • 143 - Internet Message Access Protocol;
  • 123 - NTP network time protocol;
  • 161 is a simple SNMP network management protocol.

Registered ports are required to have numbers from 1024 to 49151. The Internet Assigned Numbers Authority maintains an official list of all known and registered ranges. Frequency or dynamic ports range from 29152 to 65535. One use case for this range is time ports.

History of creation

The concept of port numbers was developed by the early creators of ARPANET. It was developed in an informal collaboration between software authors and system administrators. At that time, the term "port number" was not yet used. The number string of the remote host was a 40-bit number. The first 32 bits resembled today's IPv4 address. The most significant in this case was the first 8 bits. The less significant part of the number (these are bits 33 to 40) denoted an object called AEN. It was a prototype of the modern port number. The creation of a socket number catalog was first proposed on March 26, 1972. Network administrators were then called upon to describe each permanent number for network services and its features. This catalog was subsequently published in RFC 433 in the winter of 1972. It included a list of hosts, their port numbers, and the corresponding function used by each node on the network. For the first time, the official meanings of port numbers were documented in May 1972. At the same time, a special administrative function was proposed to maintain this registry. The first list of TCP ports included 256 AEN values. They were divided into the following ranges:

- from 0 to 63 - standard functions of the entire network;

- from 64 to 127 - host-specific functions;

- from 128 to 239 - functions reserved for future use;

- from 240 to 255 - any experimental function.

The term AEN in the early days of the ARPANET was also the socket name that was used with the original connection protocol and the Network Control Program component, or NCP. In this case, NCP was the forerunner of today's Internet protocols, which use TCP/IP ports.

To communicate with applications running on other network hosts (as well as other applications on the same host).

The basic rule necessary for understanding the operation of the port: 1) The port can be occupied by only one program and at this moment cannot be used by another. 2) All programs use ports to communicate with each other via a network.

For each of the TCP and UDP protocols, the standard defines the ability to simultaneously allocate up to 65536 unique ports on a host, identified by numbers from 0 to 65535. When transmitted over a network, the port number in the packet header is used (along with the host IP address) to address a specific application (and specific network connection belonging to it).

Port numbers

TCP ports do not overlap with UDP ports. That is, TCP port 1234 will not interfere with UDP traffic on port 1234.

A number of port numbers have been standardized (see List of TCP and UDP ports). The list is maintained by the non-profit organization IANA.

On most UNIX-like operating systems, listening on ports 0-1023 (almost all of which are registered) requires special privileges. Each of the other ports can be captured by the first process that requested it. However, there are many more registered numbers than 1024.

Brief list of port numbers

Use of the TCP protocol is assumed unless otherwise noted.

  • DISCARD: 9, Discard port (RFC 863)
  • FTP: 21 for commands, 20 for data
  • SSH: 22 (remote access)
  • telnet : 23 (remote access)
  • SMTP: 25, 465, 587
  • server: 3055
  • XMPP (Jabber): 5222/5223 - client-server, 5269 - server-server
  • traceroute : above 33434 (UDP) (some sources say that port range from 33434 to 33534 is enough)

Source and destination ports

TCP or UDP packets always contain two port number fields: the sender and the destination. The type of the utility is determined by the port of the recipient of incoming requests, and the same number is the port of the sender of responses. The "reverse" port (the port of the sender of requests, it is also the port of the recipient of responses) when connecting via TCP is determined by the client arbitrarily (although numbers less than 1024 and already occupied ports are not assigned), and is of no interest to the user. The use of reverse port numbers in UDP is implementation dependent.

Links

Notes


Wikimedia Foundation. 2010 .

See what "Port (TCP/IP)" is in other dictionaries:

    Name: Transport Control Protocol Level (according to the OSI model): Transport Family: TCP / IP Port / ID: 6 / IP Specification: RFC 793 / STD 7 Basic implementations ... Wikipedia

    Port: Wiktionary has an entry for "port" Port (lat. portus "harbour", "pier") ... Wikipedia

    Name: Transmission Control Protocol Level (according to the OSI model): Transport Family: TCP / IP Port / ID: 6 / IP Specification: RFC 793 / STD 7 Main implementations: Linux, Windows Extensibility ... Wikipedia

    The TCP/IP (Transmission Control Protocol/Internet Protocol) protocol stack is a set of network protocols of different levels of the DOD network interaction model used in networks. Protocols work with each other in a stack (English stack, stack) ... ... Wikipedia

    A TCP port number that identifies a process or application within a computer. For client applications, the port number is dynamically assigned by the operating system. For software servers, port numbers do not change and are prescribed by the Internet ... ... Financial vocabulary

    Network port parameter of UDP protocols that determines the purpose of data packets in the format This is a conditional number from 0 to 65535, allowing various programs, running on the same host, receive data independently of each other (provide this way ... ... Wikipedia

    The network port is a UDP protocol parameter that determines the purpose of data packets in the format This is a conditional number from 0 to 65535, allowing various programs running on the same host to receive data independently of each other (they provide this ... ... Wikipedia

    The network port is a UDP protocol parameter that determines the purpose of data packets in the format This is a conditional number from 0 to 65535, allowing various programs running on the same host to receive data independently of each other (they provide this ... ... Wikipedia

    The network port is a UDP protocol parameter that determines the purpose of data packets in the format This is a conditional number from 0 to 65535, allowing various programs running on the same host to receive data independently of each other (they provide this ... ... Wikipedia

The TCP/IP protocol is the foundation of the Internet, by which computers send and receive information from anywhere in the world, regardless of geographic location. Accessing a TCP/IP computer in another country is as easy as accessing a computer in the next room. The access procedure is identical in both cases, although it may take a few milliseconds longer to connect to a machine in another country. As a result, citizens of any country can easily shop at Amazon.com; however, due to logical proximity, the task of information protection becomes more complicated: any owner of an Internet-connected computer anywhere in the world can try to establish an unauthorized connection with any other machine.

It is the responsibility of IT professionals to install firewalls and systems to detect suspicious traffic. Packet sniffing extracts information about the source and destination IP addresses and the network ports involved. The value of network ports is not inferior to IP addresses; these are the most important criteria for separating useful traffic from false and harmful packets entering and leaving the network. The bulk of Internet network traffic consists of TCP and UDP packets, which contain information about the network ports computers use to direct traffic from one application to another. A prerequisite for firewall and network security is an administrator's thorough understanding of how computers and network devices use these ports.

Exploring Ports

Knowing the basic principles of network ports will be useful to any system administrator. With a basic knowledge of TCP and UDP port design, an administrator can independently diagnose a failed network application or secure a computer that will access the Internet without calling a network engineer or firewall consultant.

The first part of this article (consisting of two parts) describes the basic concepts necessary to consider network ports. The place of network ports in the overall network model and the role of network ports and NAT (Network Address Translation - network address translation) firewall in the connections of company computers to the Internet will be shown. Finally, network points will be indicated where it is convenient to identify and filter network traffic on the corresponding network ports. Part 2 looks at some of the ports used by common applications and operating systems and introduces some tools for finding open ports on a network.

Brief overview of network protocols

TCP/IP is a set of network protocols through which computers communicate with each other. The TCP/IP suite is nothing more than pieces of code installed on the operating system that provide access to these protocols. TCP/IP is a standard, so TCP/IP applications on Windows computer must successfully communicate with a similar application on a UNIX machine. In the early days of networking, in 1983, engineers developed the seven-layer OSI Interoperability Model to describe how computers communicate across networks, from cable to application. The OSI model consists of physical, data link, network, transport, session representation of data and application layers. Administrators who constantly work with the Internet and TCP/IP are primarily concerned with the network, transport, and application layers, but other layers must be known to diagnose successfully. Despite the considerable age of the OSI model, many specialists still use it. For example, when a network engineer talks about layer 1 or 2 switches and a firewall vendor talks about layer 7 control, they are referring to the layers defined in the OSI model.

This article talks about network ports located at layer 4 - transport. In the TCP/IP suite, these ports are used by the TCP and UDP protocols. But before moving on to detailed description one level, it is necessary to briefly familiarize yourself with the seven OSI layers and the role they play in modern TCP/IP networks.

Layer 1 and 2: physical cables and MAC addresses

Layer 1, the physical, represents the actual medium in which the signal propagates, such as copper cable, fiber optic cable, or radio signals (in the case of Wi-Fi). Layer 2, channel, describes the data format for transmission in the physical medium. At layer 2, packets are organized into frames and basic flow control and error handling functions can be implemented. The IEEE 802.3 standard, better known as Ethernet, is the most widely used layer 2 standard for today's local area networks. Usual network switch- a layer 2 device through which multiple computers physically connect and communicate with each other. Sometimes two computers can't connect to each other even though the IP addresses appear to be correct: Errors in the Address Resolution Protocol (ARP) cache can be the cause of the problem, indicating a problem at layer 2. In addition, some wireless points Access Points (APs) provide MAC address filtering to allow connection to a wireless AP only network adapters with a specific MAC address.

Layers 3 and 4: IP addresses and network ports

Layer 3, network, supports routing. In TCP/IP, routing is implemented in IP. A packet's IP address belongs to layer 3. Network routers are layer 3 devices that parse the packet's IP addresses and forward the packets to another router or deliver the packets to local computers. If a suspicious packet is found on the network, the first step is to check the packet's IP address to determine where the packet originated.

Together with the network layer, layer 4 (transport) is a good starting point for diagnosing network problems. On the Internet, layer 4 contains the TCP and UDP protocols and information about the network port that associates a packet with a particular application. The computer's networking stack uses a TCP or UDP network port association with an application to direct network traffic to that application. For example, TCP port 80 is associated with a Web server application. This mapping of ports to applications is known as a service.

TCP and UDP are different. Essentially, TCP provides a reliable connection for data exchange between two applications. Before communication can begin, two applications must establish a connection by following the three-step TCP handshake process. UDP is more of a "set it and forget it" approach. Communication reliability for TCP applications is provided by the protocol, while the UDP application has to check the reliability of the connection itself.

The network port is a number between 1 and 65535 specified and known to both applications that are communicating. For example, a client typically sends an unencrypted query to a server at a destination address on TCP port 80. Typically, a computer sends a DNS query to a DNS server at a destination address on UDP port 53. The client and server have a source and destination IP address, as well as the source and destination network port, which may be different. Historically, all port numbers below 1024 have been called "well-known port numbers" and are registered with the IANA (Internet Assigned Numbers Authority). In some operating systems ah, only system processes can use ports in this range. In addition, organizations can register ports 1024 through 49151 with IANA to associate the port with their application. This registration provides a structure that helps avoid conflicts between applications seeking to use the same port number. However, in general, there is nothing to prevent an application from requesting a particular port if it is not being used by another active program.

Historically, a server can listen on low port numbers and a client can initiate a connection from a high port number (greater than 1024). For example, a Web client might open a connection to a Web server on destination port 80, but associate a randomly chosen source port, such as TCP port 1025. When responding to the client, the Web server addresses the packet to the client with source port 80 and destination port 1025. The combination of an IP address and a port is called a socket and must be unique on the computer. For this reason, when setting up a Web server with two separate Web sites on the same computer, you must use multiple IP addresses, such as address1:80 and address2:80, or configure the Web server to listen on multiple network ports, such as address1:80 and address1:81. Some Web servers provide multiple Web sites on a single port by requesting a host header, but this function is actually performed by the Web server application on more than one high level 7.

As networking features appeared in operating systems and applications, programmers began to use ports above 1024 without registering all applications with the IANA. By searching the Internet for any network port, you can usually quickly find information about the applications that use that port. Or you can search for Well Known Ports and find many sites with lists of the most common ports.

When blocking a computer's network applications or troubleshooting a firewall flaw, most of the work is classifying and filtering Layer 3 IP addresses, as well as Layer 4 protocols and network ports. To quickly distinguish between legitimate and suspicious traffic, you should learn to recognize the 20 most commonly used TCP and UDP ports.

Ability to recognize network ports and familiarity with them is not limited to assigning rules to the firewall. For example, some Microsoft security patches describe how to close NetBIOS ports. This measure allows you to limit the spread of "worms" that penetrate through the vulnerabilities of the operating system. Knowing how and where to close these ports can help mitigate the security risk to your network while preparing to deploy a critical patch.

And straight to level 7

You rarely hear about layer 5 (session) and layer 6 (presentation) these days, but layer 7 (application) is a hot topic among firewall vendors. The latest trend in the development of network firewalls is Layer 7 Inspection, which describes the methods used to analyze how an application works with network protocols. By analyzing the payload of a network packet, the firewall can determine the legitimacy of the traffic passing through it. For example, a Web request contains a GET statement inside a layer 4 packet (TCP port 80). If the firewall implements layer 7 functions, then you can check the correctness of the GET statement. Another example is that many peer-to-peer (P2P) file sharing programs can hijack port 80. As a result, an unauthorized person can configure the program to use a port of their choice - most likely a port that should remain open in this firewall. If a company's employees need access to the Internet, port 80 must be opened, but in order to distinguish between legitimate Web traffic and P2P traffic directed by someone on port 80, the firewall must provide layer 7 control.

Role of the firewall

Having described the network layers, we can move on to describing the mechanism for communication between network applications through firewalls, paying special attention to the network ports used. In the following example, the client browser communicates with a Web server on the other side of a firewall, similar to how an employee of a company communicates with a Web server on the Internet.

Most Internet firewalls operate at layers 3 and 4 to examine and then allow or block incoming and outgoing network traffic. In general, the administrator sets up access control lists (ACLs) that define the IP addresses and network ports of the traffic to block or allow. For example, to access the Web, you need to launch a browser and point it to a Web site. The computer initiates an outgoing connection by sending a sequence of IP packets consisting of a header and payload. The header contains information about the route and other attributes of the packet. Firewall rules are often composed of routing information and typically contain source and destination IP addresses (layer 3) and packet protocol (layer 4). When browsing the Web, the destination IP address belongs to the Web server, and the protocol and destination port (by default) is TCP 80. The source IP address is the address of the computer from which the user accesses the Web, and the source port is usually a dynamically assigned number , greater than 1024. Helpful information does not depend on the header and is generated by the user's application; in this case, it is a request to a Web server to provide a Web page.

The firewall analyzes outgoing traffic and allows it according to the firewall rules. Many companies allow all outgoing traffic from their network. This approach simplifies setup and deployment, but the lack of control over the data leaving the network reduces security. For instance, " Trojan horse can infect a computer on an enterprise network and send information from that computer to another computer on the Internet. It makes sense to create access control lists to block such outgoing information.

Unlike the approach taken by many firewalls to outgoing traffic, most are configured to block incoming traffic. Typically, firewalls only allow incoming traffic in two cases. The first is traffic that comes in response to an outgoing request sent earlier by the user. For example, if you point your browser to a Web page address, the firewall allows the HTML code and other components of the Web page to enter the network. The second case is hosting an internal service on the Internet, such as mail server, Web site, or FTP site. Hosting such a service is commonly referred to as port translation or server publishing. The implementation of port translation varies between different firewall vendors, but the underlying principle is the same. The administrator defines a service, such as TCP port 80 for the Web server, and an internal server to host the service. If packets enter the firewall through front end corresponding to this service, then the port translation mechanism forwards them to a specific network computer hidden behind a firewall. Port forwarding is used in conjunction with the NAT service described below.

Basics of NAT

With NAT, multiple computers in a company can share a small space of public IP addresses. A company's DHCP server can allocate an IP address from one of the private, Internet-non-routable IP address blocks defined in Request for Comments (RFC) #1918. Multiple companies can also share the same private IP address space. Examples of private IP subnets are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Internet routers block any packets destined for one of the private addresses. NAT is a firewall feature that allows companies that use private IP addresses to communicate with other computers on the Internet. The firewall knows how to translate incoming and outgoing traffic to private internal IP addresses so that every computer can access the Internet.

Today we have software, virtual ports in line. There are no such application programs today that do not use network protocols for data exchange in their work. For their data transfer, transport protocols are used, the most popular are TCP / IP and UDP. In order for your browser to "understand" that some information has arrived for it, it must get on the software port that your browser is "listening to".

  • The most important function of TCP/IP and UDP is to identify the program (or process) that generated the transferred data. For this, the port number that is assigned is used. this process organization IANA. Here, too, their standards have long existed and port numbers are published in RFC 1700. On a computer, a list of ports can be found in the SERVICES file of the TCP/IP client.

When the packet reaches the destination, the transport layer protocol (in our case, TCP/IP) receives the datagram, reads the port number from the corresponding field, and passes this information to a program (or protocol) that starts working with the received data.

All major applications on the Internet are assigned certain port numbers, which are called "well-known ports". For example, the standard port of the WEB server is number 80, the proxy server may have the number 8080, the FTP server works with port 21 or 20.

I will briefly list well-known port numbers in the context of services:

  • ftp data. A file transport protocol data channel used to transfer files between systems using the TCP protocol. 21 ports are used;
  • ftp. FTP control channel. Used by session participants on this channel to exchange commands and responses to them using the TCP protocol. Uses port 20;
  • telnet. Used to execute commands on remote computer through port number 23 through the TCP protocol;
  • SMTP. Or - a simple mail protocol for transmitting data via email. Previously, port number 25 was used, now encryption is used and the port number is different. Depends on the service provider;
  • domain. Uses port 53 over UDP and TCP protocols to receive hostname resolution requests;
  • http. Transport protocol for hypertext markup. Used to send requests from the browser (for example, your requests in Yandex). Port 80 is used;
  • POP3(mail office protocol version 3). Used to receive email. used port 110 before encryption, now the number has changed. Please check with your service provider for port numbers.

When traffic is redirected to another system, TCP/IP uses a combination of and a particular port. Such a bundle is called a "Socket". For example, from the Internet or local network You can access the FTP server folder by specifying the IP address and port separated by a colon: 192.168.0.3:21.

Well-known port numbers are not strictly regulated. You can change them to your liking. In this case, the required port is specified in the program settings, and when accessing it through a browser, it must also be specified in the address bar. This must be done to check whether a particular port is open or closed.

What are Dynamic FTP Ports

Since requests usually go to the server from the client (and not vice versa), well-known port numbers are relevant for servers. They "listen" through the ports of their clients, who do not need these numbers. At the time of communication client program(or operating system) uses its temporary port number, or some range of numbers. IANA defines numbers from 1 to 1023. And temporary numbers start at 1024 and up. The FTP client program works in the same way - it has its own time range, by which it tries to "reach out" to the desired server.

When we set up an FTP server, we specify port 21 for data transfer. But, the program that directly manages the server must not only transfer data, but also give access to data to users of this server. Using the same range of temporary (or dynamic) ports. Through these ports, it "listens" to users of the FTP server and establishes connections. The range of dynamic FTP ports is set when configuring the corresponding program:

V Windows Server 2012-2016, you can set an arbitrary range of ports directly in the operating system without using third-party programs. The range of numbers is set from 1024 to 65535, this is a limitation of the transport protocol.

How to check ports on a router

Here we are talking about the ability to access your computer from the Internet. For example, you have a network of several computers at home. Within the network access to them exists. And there is no access to them from the Internet, although you have the Internet at home. Some "raise" a game server at home in order to play online with friends. In this case, you need access to the server from the Internet, which is done by port forwarding.

Open ports can threaten the security of your computer. If your computer has been assigned an external IP address, then such a check is relevant for you. You can check with the help of numerous online services. Enter your external IP and you're done:

A normal (from a security point of view) situation is when all ports on the router are closed. If the address is assigned to the router, then you need to check each computer. By default, the firewall and protection against dos attacks are usually enabled on the router, and then the check will not show you anything. In this case, you need to go to your router and see the list of open ports in the "Virtual Server" or "Forwarding" section:

I have such a rule enabled for ftp. I tell you more about how to open ports on the router here.

How to check if a port is open on a Win10 computer or not

Even if the port is open on the router, it can be closed on the target computer. And then there will be no access through this loophole via the Internet. Various viruses also use ports in their work. If you see a certain open port on yourself, you need to find a program that uses it. If you do not find it, then you need to conduct an anti-virus scan. I use domestic free utilities - kaspersky and doctor web.

Get a list of open ports on a network computer

To get a list of ports, you must first run command line(required as administrator) :

And copy the “netstat -bn” command there

A list of sockets will be displayed, as well as applications that are identified with them in this moment. You can also see the addresses of external resources that communicate with ports:


Computer ports and firewall

A firewall (or firewall) is a filter that closes ports other than well-known ones, and those that are used installed programs. However, these ports can be easily closed and reopened manually. Given software comes with operating systems. Additionally, it can be activated in the antivirus program, as well as on the router.

Each of them, at its own level, filters out unnecessary requests, as a result of which there is no data exchange on these ports. The security of the system as a whole becomes more reliable. On Windows, the firewall can be found in the Control Panel.


If at the entrance your firewall looks like mine, it is disabled. If something does not work (for example, not configuring FTP in any way), then you can disable it to make sure that it is the firewall that is blocking your connections.

You can enable the firewall by clicking on the link of the same name in the left part of the window. At the same time, do not block ports as much as possible:

Antiviruses have their own firewall, you can use it. But, at first, this can cause inconvenience, because the program needs to be taught. With each connection, it will ask you for permission to connect and prescribe rules. Since there will also be temporary ports, the learning process is stretched for a long time. Therefore, we will learn to open ports on a classic Windows firewall.

How to open ports in Windows 10 firewall(49, 50, 4955, 25655)

To remove filters from all ports, disable the firewall for good. If fine-tuning is needed, then we will configure each port optionally. We go further to the "Advanced options":

Next, we will need to set up rules for incoming and outgoing connections. Everything is clear - green is “allowed”, red is “forbidden”.

To create a rule, right-click on the "incoming connections" and create the one we need. Please note - if you have a program that uses temporary dynamic ports - you can specify it, not the port number. Aces have customizable rules - you can configure a filter in combination with services and programs.

We will be configuring the port, so select "For Port" and click "Next".

We select the TCP protocol (if necessary, you can make similar settings for the UDP protocol). Separate the required ports with a comma. You can specify a range of ports through a hyphen, if necessary. Next, go to the connection security settings.

A secure connection requires authentication and is only selected if a secure connection is being used. Therefore, we choose the top item. Next, we select all available network types on our computer:

Do not forget to specify the name of our rule, so that it will be easy to find it later. This completes the firewall configuration for incoming connections.

In the list of rules, we now see ours, and if necessary, we can disable or delete it. The ports will be closed.

For a full-fledged data exchange, you should make the same rule settings for outgoing connections. If you plan to configure access from the Internet through these ports, you need to forward these ports on the router. Enough information for today, good luck!

tell friends