How to close Windows ports. How to close vulnerable ports in Windows? How to close port 445 on a computer

To solve various problems related to the local network or the Internet, Windows 10 uses predefined ports. One of them, number 445, in some cases is recommended to be closed manually, despite the fact that the operating system turns it on automatically.

What is a TCP port

Port 445 is one of the TCP ports. TCP is a protocol, that is, a set of conditions and rules that ensure stable interaction between multiple devices over the Internet. This protocol, like all others, establishes a certain format for transmitting information. If it were not there, then, for example, from one device a packet of information would be sent in the form of the string “User: Name”, while another device expected to see the string “Name - user”, as a result of which it would not be able to correctly process the request and the Internet connection was interrupted.

The TCP protocol also provides security by checking the IP address (a unique device number) every time a data packet is sent. Thanks to this, even if any third-party device is introduced into the flow of transmitted information, the data will not be sent to it.

What is port 445 responsible for?

Port number 445 is one of many that operate over the TCP protocol. But it has a specific job that other ports don't do—providing connections between shared printers, scanners, and folders. Shared refers to devices and data that can be accessed from any computer, not just the one to which they are connected or located.

For example, you can connect to a shared printer from a computer that does not have a direct cable connection to the printing device. To do this, you need to connect to the computer to which the cable from the printer is connected via port 445. After this, the user of the device will be able to send commands to the printer (start printing, stop it, etc.) without physically connecting to it.

With a connection to port 445, you can also view the contents of your hard drive and change it.

Why port 445 should be closed

On the one hand, port 445 will be useful if you work on several computers at once: you can quickly exchange data and control devices connected to another computer via the Internet. On the other hand, open port 445 puts you in danger. Experienced people can use it as a vulnerability in the operating system: they will connect to it and gain access to your files located on your hard drive.

If you do not intend to use the capabilities of this port or store important files in the computer's memory, use the instructions below to close the port, thereby patching one of the potentially dangerous holes in Windows.

How to check if a port is open

Before closing a port manually, it is worth checking whether it is currently open. By default, Windows 10 opens it. But some third-party antiviruses, or more precisely firewalls (programs that ensure network security), can close it.

Closing the port

In Windows 10, there are several ways to close port 445. If one of them does not work for some reason, try another. But no matter what method you choose, the result will be the same - port 445 will no longer be listened to, that is, it will be impossible to connect to it.

Using a firewall

A firewall is a program that ensures the security of a user using the Internet, so it can be used to block potentially dangerous ports. Windows 10 has a built-in firewall that can handle this task:

  1. Expand the Windows search bar by clicking on the magnifying glass icon located in the lower left corner of the screen. Enter the query “Windows Firewall” and expand the found option. Open firewall settings
  2. In the Control Panel window that opens, click on the “Advanced Settings” line.
    Open additional firewall settings
  3. Go to the Inbound Rules folder and start creating a new rule.
    Click the “Create Rule” button
  4. Specify that the rule will be created for the port and proceed to the next step.
    Specify the option “For port”
  5. Check the box next to “TCP Protocol” and enter port 445.
    Select TCP protocol and port 445
  6. Select the "Block connection" option.
    Select “Connection blocking”
  7. Do not uncheck all three boxes, let the blocking apply to all levels.
    Leave the created rule to be applied to all profiles
  8. Write down a clear name and description, which in the future will allow you to remember what the created rule is responsible for - suddenly you or another user will have to unblock this port.
    Specify a name and description for the task

Using the command line

The command line allows you to manage all system settings. Including through it you can open and close ports:


By completing the above two steps, you will create the same firewall rule as you would have done by configuring the firewall.

Using the registry

The registry stores values ​​for all operating system settings. By changing them, you can activate or deactivate the port:


After completing all the steps, close the registry and restart your computer for the changes to take effect.

With the help of WWDC

WWDC is a third-party program that simplifies the process of enabling and disabling ports. The official website from which you can download the application is http://wwdc.toom.su (not available at the time of writing).

After you download and open the program, a list of ports and their status will appear: enable - enabled, disable - suspended, close - closed. Find number 445 among all ports and click on the button located under its name - its status will change. You must set the option to close.


Set port 445 to close

After the required parameter is set, the changes will take effect and port 445 will be closed.

Video: how to close a port in Windows 10

Port 445 is responsible for remote work with shared printers and folders. Its disadvantage is that it reduces the level of system protection. To protect yourself from viruses, you should close this port using a firewall, command line, registry, or WWDC application.

Yesterday, unknown people staged another massive attack using an encryption virus. Experts said that dozens of large companies in Ukraine and Russia were affected. The ransomware virus is called Petya.A (probably the virus is named after Petro Poroshenko). They write that if you create a perfc file (without extension) and place it at C:\Windows\, the virus will bypass you. If your computer reboots and starts “disk check”, you need to turn it off immediately. Booting from a LiveCD or USB drive will give you access to the files. Another method of protection: close ports 1024–1035, 135 and 445. We will now look at how to do this using Windows 10 as an example.

Step 1
Let's go to Windows Firewall(it’s better to choose enhanced security mode), select the “ Extra options».
Select the tab " Rules for incoming connections", then the action " Create a rule"(in the right column).

Step 2
Select the type of rule - “ for Port" In the next window, select “ TCP protocol", indicate the ports you want to close. In our case it is " 135, 445, 1024-1035 "(without quotes).

Step 3
Select the item “ Block connection", in the next window we mark all profiles: Domain, Private, Public.

Step 4
All that remains is to come up with a name for the rule (so that it will be easy to find in the future). You can specify a description of the rule.

If some programs stop working or work incorrectly, you may have blocked the port they are using. You will need to add an exception for them in the firewall.

135 TCP port used by remote services (DHCP, DNS, WINS, etc.) and in Microsoft client-server applications (for example, Exchange).

445 TCP port used in Microsoft Windows 2000 and later for direct TCP/IP access without using NetBIOS (for example, in Active Directory).

Publication

Every day, PC owners are faced with a huge number of dangerous programs and viruses that somehow end up on the hard drive and cause leakage of important data, computer breakdown, theft of important information and other unpleasant situations.

Most often, computers running Windows OS of any version are infected, be it 7, 8, 10 or any other. The main reason for these statistics is the incoming connections to the PC or “ports”, which are the weak point of any system due to their availability by default.

The word "port" is a term that refers to the serial number of incoming connections that are directed to your PC from external software. It often happens that these ports are used by viruses that can easily penetrate your computer using an IP network.

Virus software, having entered the computer through such incoming connections, quickly infects all important files, not only user files, but also system ones. To avoid this, we recommend closing all standard ports that could become your vulnerability when attacked by hackers.

What are the most vulnerable ports on Windows 7-10?

Numerous studies and surveys of experts show that up to 80% of malicious attacks and hacks occurred using four main ports used for fast file exchange between different versions of Windows:

  • TCP port 139, required for remote connection and control of a PC;
  • TCP port 135, intended for executing commands;
  • TCP port 445, allowing fast file transfer;
  • UDP port 137, which is used to quickly search on a PC.

Closing ports 135-139 and 445 in Windows

We invite you to familiarize yourself with the simplest ways to close Windows ports, which do not require additional knowledge or professional skills.

Using the command line

The Windows command line is a software shell that is used to specify certain functions and parameters for software that does not have its own graphical shell.

In order to launch the command line, you must:

  1. Press the Win+R key combination at the same time
  2. In the command line that appears, enter CMD
  3. Click on the “OK” button

A working window with a black background will appear, in which you must enter the following commands one by one. After each entered line, press the Enter key to confirm the action.
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=135 name=»Block1_TCP-135″(command to close port 135)
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=137 name=»Block1_TCP-137″(command to close port 137)
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=138 name=»Block1_TCP-138″(command to close port 138)
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=139 name=»Block_TCP-139″(command to close port 139)
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=445 name=»Block_TCP-445″(command to close port 445)
netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=5000 name=»Block_TCP-5000″

The six commands we have given are necessary to: close 4 vulnerable Windows TCP ports (open by default), close UDP port 138, and also close port 5000, which is responsible for displaying a list of available services.

Closing ports with third-party programs

If you don't want to waste time working with the command line, we suggest you check out third-party applications. The essence of such software is to edit the registry automatically with a graphical interface, without the need to manually enter commands.

According to our users, the most popular program for these purposes is Windows Doors Cleaner. It will help you easily close ports on a computer running Windows 7/8/8.1/10. Older versions of operating systems, unfortunately, are not supported.

How to work with a program that closes ports

In order to use Windows Doors Cleaner, you must:

1. Download the software and install it
2. Run the program by right-clicking on the shortcut and selecting “run as administrator”
3. In the working window that appears, there will be a list of ports and the “Close” or “Disable” buttons, which close vulnerable Windows ports, as well as any others you wish
4. After the necessary changes have been made, you need to reboot the system

Another advantage of the program is the fact that with its help you can not only close, but also open.

Drawing conclusions

Closing vulnerable network ports in Windows is not a panacea for all ills. It is important to remember that network security can only be achieved through comprehensive actions aimed at closing all vulnerabilities of your PC.

For Windows security, the user must install critical updates from Microsoft, have licensed anti-virus software and a firewall enabled, use exclusively secure software and regularly read our articles, in which we talk about all the existing ways to achieve anonymity and security of your data.

Do you know better ways to close network ports? Share your knowledge in the comments and don’t forget to repost the article to your page. Share useful information with your friends and don't give hackers a chance to harm your loved ones!

How to close vulnerable ports in Windows?

How to close vulnerable ports in Windows?

Almost every day, dozens of computers around the world are infected with dangerous viruses, and more and more users are starting to look for ways to improve the security of their personal computer.

PCs running the Windows operating system are most often infected. This is due to the fact that most viruses penetrate the OS through certain incoming connections, so-called “ports”, which, unfortunately, are enabled by default.

Simplifying somewhat, the concept of “port” can be defined as the number of incoming connections from external programs (including viruses) to your computer via an IP network. Each port is assigned a unique number to identify the only possible recipient of data in the operating system.

Having penetrated the computer, viruses begin to infect user data and open all previously closed Windows ports for faster spread throughout the system. To prevent this from happening, it is necessary to block the most vulnerable ports, thereby preventing the possibility of infection and raising Windows security to a higher level.

The most vulnerable ports of Windows 7 – 10

  • TCP port 445 (it is used for file exchange)
  • TCP port 139 (designed for remote connection to a computer)
  • UDP port 137 (used to search for information on other computers)
  • TCP port 135 (command tasks are executed through it)

How to close ports 135 to 139 and 445 in Windows?

There are many options for closing Windows ports, but in this article we will look at the easiest ways to do this.

Method 1 - Using the Command Line

The Windows command line is used to set values ​​for system settings that do not have a graphical interface. These functions include the open connection ports under consideration.

The command line starts in several stages:

  • Press the key combination Win+R
  • In the command window that appears, type CMD
  • Click "OK"


A window with a black background will appear in front of you. Copy the lines below into it one by one and press the enter key:

netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=135 name="Block1_TCP-135"

netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=137 name="Block1_TCP-137"

netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=138 name="Block1_TCP-138"

netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=139 name="Block_TCP-139"(the command helps close port 139)

netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=445 name="Block_TCP-445"(the command helps close port 445)

netsh advfirewall firewall add rule dir=in action=block protocol=tcp localport=5000 name="Block_TCP-5000"

These six commands close the 4 most dangerous open Windows ports listed above, as well as port 5000, which is responsible for discovering open services, and UDP port 138 for NetBIOS name resolution.

Method 2 - using third-party programs

To avoid manual command line work, you can use third-party software. The essence of his work comes down to the same editing of the registry as in the method above, only in a visual display.

Instructions for working with a program that closes ports

    1. 1. Download and install the program
    1. 2. The installed program must be run with administrator rights
    1. 3. In the window that appears, clicking the “Close” or “Disable” buttons disables and closes all vulnerable Windows ports

It is important to note that with this program you can not only close, but also open ports.

Conclusion

In addition to closing the most dangerous network ports on your computer, you must remember that these actions do not achieve maximum security for the operating system.

On your Windows, you need to install critical update packages sent by Microsoft, antivirus programs, secure browsers and other software that increases security and anonymity.

We invite you to discuss the topic of protecting network ports in the comments and share useful methods for increasing confidentiality. Don't forget to send the link to this article to your friends so that they too know how to close open Windows ports.

Also watch our video where we talk in more detail about how to close vulnerable ports: