Windows Defender ATP - securitycenter.windows.com.
Firewalls are there to protect you from threats on the internet (both traffic from the internet and from local applications trying to gain access when they shouldn’t). Sometimes, though, you’ll want to allow otherwise restricted traffic through your firewall. To do so, you’ll have to open a port.
When a device connects to another device on a network (including the internet), it specifies a port number that lets the receiving device know how to handle the traffic. Where an IP address shows traffic how to get to a particular device on a network, the port number lets the receiving device know which program gets that traffic. By default, most unsolicited traffic from the internet is blocked by Windows Firewall. If you’re running something like a game server, you might need to open a port to allow that specific kind of traffic through the firewall.
![Com Com](http://mdc.custhelp.com/euf/assets/images/KB%2020021-4.png)
Note: This article shows you how to open a port on a particular PC’s firewall to let traffic in. If you have a router on your network (which you likely do), you will also need to allow the same traffic through that router by forwarding the port there.
How to Open a Port on Windows 10
Clicking Start, type “Windows Firewall” into the search box, and then click on “Windows Defender Firewall.”
Once Windows Firewall opens, click on “Advanced Settings.”
This launches Windows Defender Firewall with Advanced Security. Click the “Inbound Rules” category on the left. In the far right pane, click the “New Rule” command.
If you need to open a rule for outgoing traffic, instead of clicking “Inbound Rule,” you’d click “Outbound Rule.” Most apps are pretty good about creating their own outbound rules when you install them, but you might occasionally run into one that cannot.
On the Rule Type page, select the “Port” option and then click “Next.”
On the next screen, you’ll have to choose whether the port you’re opening uses the Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). Unfortunately, we can’t tell you specifically which to use because different apps use different protocols. Port numbers can range from 0-65535, with ports up to 1023 being reserved for privileged services. You can find an unofficial list of (most) TCP/UDP ports on the Wikipedia page, and you can also search for the app you’re using. If you can’t determine the specific protocol to use for your app, you can create two new inbound rules—one for TCP and one for UDP.
Select the “Specific Local Ports” option and then type the port number into the field provided. If you’re opening more than one port, you can separate them by commas. If you need to open a range of ports, use a hyphen (-).
Click “Next” when you’re done.
On the next page, click “Allow the Connection” and then click “Next.”
Note: For this guide, we’ll be using the “Allow the Connection” option, as we trust the connection for which we’re creating a rule. If you want a little more piece of mind, the “Allow the connection if it is secure” rule uses Internet Protocol security (IPsec) to authenticate the connection. You can try that option, but many apps do not support it. If you try the more secure option and it doesn’t work, you can always come back and change to the less secure one.
Next, choose when the rule applies and click “Next.” You can choose one or all of the following:
- Domain: When a PC is connected to a domain controller that Windows can authenticate access to the domain.
- Private: When a PC is connected to a private network, like a home network or a network that you trust.
- Public: When a PC is connected to an open network, like a cafe, airport, or library where anyone can join, and the security is unknown to you.
RELATED:What’s the Difference Between Private and Public Networks in Windows?
In the final window, give your new rule a name and an optional, more detailed description. Click “Finish” when you’re done.
If you want to disable the rule at any point, locate it in the list of Inbound or Outbound Rules, right-click it, and then click “Disable Rule.”
That’s all there is to it. If you need to open any other ports for a different program or with a different rule, repeat the steps above using a different set of ports to open.
RELATED:How to Create Advanced Firewall Rules in the Windows Firewall
READ NEXT- › How to Use the Linux cat and tac Commands
- › How to See Which Apps Are Using Your Webcam on Windows 10
- › Future Tech: What We’re Most Excited About
- › How Do Smart Homes Work?
- › What’s Going to Happen to Your Huawei or Honor Phone?
Each time when you connect a new COM device or a USB device (true for modems, smartphones, Bluetooth, serial-to-USB converters, etc.), Windows detects it using Plug-n-Play and assigns it some COM port number in the range of 1 to 255. If this device is connected again, the reserved port is assigned to it. A new device gets the first free COM port number. It often occurs that, when being connected, the external devices create several COM ports at once. In my case after connecting a Bluetooth adapter 10!!! new COM ports has appeared in the system.
A number of applications (quite obsolete, as a rule) are able to address only two-digit COM port numbers and won’t work with COM100 or higher. In the worst cases, these programs work only with COM1-COM9 ports. What if a device has got a higher number? Could the numbering scheme of the reserved COM ports be reset and the assigned ports be deleted? Let’s try to deal with it in Windows 7.
As a rule, you are not able to change the assigned COM port in the hardware properties, since the system says that all “lower” COM ports are already in use.
How to Change a COM Port Number for a Specific Device
First of all, try to reassign the COM port number for a specific COM device manually. Suppose that the necessary COM port is already busy and we would like to free it.
- Start the Device Manager as follows:
set devmgr_show_nonpresent_devices=1
start devmgmt.msc
- Select View->Show Hidden Devices in the console menu.
- Expand Ports (COM & LPT) branch and find the device, which is assigned the necessary COM port in the list. (A pale icon means that this COM port is already assigned, but currently the device is not connected) Right-click it and select Uninstall.
- The freed up COM port can be assigned to another device. Find your device in the same branch, and open the Properties window. Then go to the PortSettings tab and click Advanced. In the dropdown list, select the free COM port.
This method is not always useful in trying to free up a busy COM port. Then you will have to make some changes to the registry.
![Read From Com Port Windows Read From Com Port Windows](https://i.stack.imgur.com/gA5Pk.png)
How to Reset COM Port Binding Using the Registry
The information about busy COM ports is stored in CommDB registry key in HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlCOM Name Arbiter section.
- Open the Registry Editor (regedit) and go to the branch mentioned above.Important! We strongly recommend to back up this registry branch (File -> Export) before doing anything. If something goes wrong, you can get back to the original port configuration.
- The value of ComDB parameter in the binary format determines the list of COM ports reserved in the system. Each bit determines the state of the corresponding port (from 1 to 255). For example, if you need to leave the reservation only for COM3, the hex value of ComDB is equal to 04 (0000 0100) Important! Be very attentive, and don’t add any additional bits to the parameter, or the system will display the BSOD.
- If you have to reset all COM port bindings, change the value of ComDB to 0.Note. In HKEY_LOCAL_MACHINEHARDWAREDEVICEMAPSERIALCOMM section, you can see the list of COM ports connected to the system.
- The HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionPorts branch contains the list of all assigned COM ports. All unnecessary ports may be deleted. In our example, we’ll leave only COM3 and delete the rest ports.
- Unplug all external devices and restart your computer.
- After the restart, connect the devices in the necessary order. (Reinstall USB-to-serial converters, etc.) All COM ports found by the system will be automatically identified by the system and assigned the COM port numbers one by one.