How to Block or Allow TCP/IP Port in Windows Firewall | Action1 (2024)

Windows Firewall allows you to restrict outgoing/incoming network traffic for a specific application or TCP/IP port. It is a popular means of restricting network access to/from user workstations or servers. Windows Firewall rules can be configured individually on each computer. Or, if your computer is in a Windows domain, the administrator can manage the settings and rules of Windows Firewall using group policies. In large organizations, port filtering rules are usually brought to the level of a router, L3 switches, or dedicated firewalls. However, nothing prevents you from spreading your Windows Firewall network access restriction rules to Windows workstations or servers.

How to Configure Windows Firewall Settings

You can configure Windows Firewall settings (block or open port in Windows 10/8/7) according to your needs and restore the default settings if required. To do this, simply navigate to theAdvanced Settingsof the firewall. Start by opening up the control panel and typing ‘Firewall’ into the search box type. Then, open Firewall and click on the ‘Advanced Settings’ link.

Read on for detailed instructions on how to block or open a port in Windows 10/8/7 Firewall.

How to Block or Open a Port in Windows 10/8/7 Firewall

1. Open Windows Firewall and find the Advanced Settings. To open Windows Firewall, type ‘firewall.cpl’ into the search bar and press the Enter key.

When ‘Advanced Settings’ opens, click theAdvanced Settingslink in the left-hand pane of the main firewall dialog box. This will bring up the ‘Windows Firewall with Advanced Security’ window.

2. Open the List of Inbound Rules.

On the left-hand pane of the window, click on ‘Inbound Rules‘ to bring up the list of rules.

4. Open the New Inbound Rule Wizard.

Select ‘Port‘ and then click ‘Next.’ This will open the ‘New Inbound Rule Wizard’ window.

From there, select ‘Port’ as the new Rule Type and click ‘Next.’

Click on ‘Specific local ports.’ Then choose a port number (e.g., 80).

Click ‘Next‘ to continue.

5. Block the Connection.

In the Action window, select ‘Block the connection’ and click ‘Next.’

6. Apply Your New Rule to Each Profile Type.

In the Profile window, tick the boxes to apply your rule to each of the three profile types: Domain, Private, and Public. Click ‘Next‘ to continue.

7. Name Your Rule and Configure the Settings.

Choose a name for your new rule, e.g., ‘block suspicious ports.’

If you want, you can also add an optional description to your rule.

When you’re done, click ‘Finish‘ to configure the settings.

How to Open a Port in Windows Firewall

You may want to open a port in the Windows Firewall in order to let a specific IP address communicate with your computer (e.g., when you’re playing games). The procedure to open a port remains more or less the same. All you need to do is follow the instructions in the New Inbound Rule wizard, specify the Port, and select ‘Allow the connection.’

How to Turn off TCP/IP Port in Windows Firewall with Action1

Follow the steps below to turn off the TCP/IP Port in Windows Firewall:

1. Log in to the Action1 dashboard.

2. In the menu on the left-hand side, select ‘Managed Endpoints.’

3. Mark the endpoint for the port you want to block.

4. Click the ‘More Actions‘ button and then select theRun Commandoption.

5. In the window that opens, enter the commandnetsh advfirewall firewall add rule name=”BlockAIM” protocol=TCP dir=out remoteport=4099 action=block. (In this case, we’re blocking port 4099).

6. Click ‘Next Step.’

7. Click ‘Add Endpoints‘ and then select the endpoints to which you will apply this blocking rule.

8. Click ‘Next Step‘ and schedule the execution time of your command.

9. Click ‘Finish.’

Get Started with Action1 Cloud Patch Management Solution

Action1 allows IT professionals to efficiently manage configurations for remote computers within and outside the local network. In addition, the platform offers totalcontrol of patch management, OS and application upgrade distribution, software deployment,remote access, as well as many other features to run your IT security and administration as seamlessly as possible.

How to Block or Allow TCP/IP Port in Windows Firewall | Action1 (2024)

FAQs

How to Block or Allow TCP/IP Port in Windows Firewall | Action1? ›

Step 1: Open the Control Panel Step 2: Click on Windows Firewall/ Windows Defender firewall Step 3: Navigate to advanced settings. Step 4:Right click on inbound rules and click on new rule. Step 6:Select port and press next Step 7:Specify the port 445 under specific local ports, select TCP and press next.

How do I block TCP ports in Windows Firewall? ›

Step 1: Open the Control Panel Step 2: Click on Windows Firewall/ Windows Defender firewall Step 3: Navigate to advanced settings. Step 4:Right click on inbound rules and click on new rule. Step 6:Select port and press next Step 7:Specify the port 445 under specific local ports, select TCP and press next.

How do I enable TCP IP port in Windows? ›

To enable DHCP or change other TCP/IP settings
  1. Select Start, then type settings. Select Settings > Network & internet.
  2. Do one of the following: ...
  3. Next to IP assignment, select Edit.
  4. Under Edit network IP settings or Edit IP settings, select Automatic (DHCP) or Manual. ...
  5. When you're done, select Save.

How do I allow TCP connection on a port? ›

To allow traffic in fixed TCP/IP ports in Windows on the license server computer: Ensure that no other software or service is using the ports that you are about to set fixed. Use the command line command netstat -anp TCP to find out which ports are in use.

How do I enable TCP in my firewall? ›

Open ports in Windows Firewall
  1. From the Start menu, select Control Panel, select System and Security, and then choose Windows Firewall. ...
  2. Select Advanced Settings.
  3. Select Inbound Rules.
  4. Select New Rule in the Actions window.
  5. Choose the Port rule type.
  6. Select Next.
  7. On the Protocol and Ports page, choose TCP.
Feb 2, 2024

How do I allow a specific port through Windows Firewall? ›

How to open a port on the firewall
  1. Click on Start then on Control Panel.
  2. Click on Windows Firewall and then click on Advanced Settings.
  3. Right click on Inbound Rules then on New Rule:
  4. Select Port and click on Next:
  5. Enter a specific local port (e.g. 8080) and click on Next:
  6. Click on Next:
  7. Name the rule and click on Finish:
Jun 16, 2023

Does firewall block TCP? ›

A firewall should by default block everything, no mater, if it is TCP, UDP or some other protocol. Next you would go and add firewall rules, that allow certain types of traffic. Usually there is not much different types of traffic on the incoming side and most of them are TCP connections.

How do I know if my TCP port is enabled? ›

On a Windows computer

Press the Windows key + R, then type "cmd.exe" and click OK. Enter "telnet + IP address or hostname + port number" (e.g., telnet www.example.com 1723 or telnet 10.17. xxx. xxx 5000) to run the telnet command in Command Prompt and test the TCP port status.

How to block an IP in Windows Firewall? ›

Click on Start >> Administrative tools >> Windows Firewall with Advanced Security. Click on Custom and on the next page select All Programmes. You are now at Protocol & Ports wizard. Here you can create specific inbound rules to block the external IP.

How to check if a port is blocked by a firewall? ›

To see if your firewall is blocking a website, app, or port on Windows, go to Windows Firewall > Advanced Settings and check your Outbound rules. On a Mac, click the Apple icon > System Settings > Network > Firewall > Options to check your firewall settings.

How do I secure my TCP port? ›

To ensure port security, it is recommended to perform port scanning regularly, prioritize monitoring services, disable ports that are not being used, and perform port traffic filtering in order to block or allow incoming and outgoing packets on the network.

How do I allow TCP port 443 traffic? ›

Select “TCP” > “Specific local ports,” and type in “443” next to it. In the “Action” window, select “Allow the connection” and click “Next.” In the “Profile” window, choose “Domain” > “Private,” and click “Next.”

How do I enable TCP IP connection? ›

Enable Named Pipes and TCP/IP Connections
  1. Select Start, and in your list of programs, select SQL Server Configuration Manager.
  2. Navigate to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for <machine instance>.
  3. Double-click Named Pipes. ...
  4. From Enabled, select Yes. ...
  5. Double-click TCP/IP.

How to block a TCP port with the firewall? ›

Block or allow TCP/IP port in Windows Firewall
  1. Step 1: Block port in Windows Firewall. ...
  2. Step 2: Select Inbound Rules. ...
  3. Step 3: Select the 'New Rule' option. ...
  4. Step 4: Select 'Port' ...
  5. Step 5: Click Next. ...
  6. Step 6: Select 'Block the connection' ...
  7. Step 7: Select all the profiles available.
Jan 17, 2019

How do I allow ports from IP in firewall? ›

Open a Port in Firewalld
  1. Log into SSH.
  2. Check if the application port is defined as a service (e.g. IMAPS, Kerberos, MySQL): firewall-cmd -get-services.
  3. If the service is listed, whitelist the service permanently in the current zone: sudo firewall-cmd --permanent --add-service=SERVICE. ...
  4. Reload Firewalld to apply changes:
Dec 1, 2023

How do I know if my TCP IP is enabled? ›

Select the Windows Start button, then the Settings menu, and then the Control Panel from the Settings menu. Double click on the Network icon. Look in the top list box in the Configuration tab. If you do not see an entry that starts with TCP/IP then you have not installed TCP/IP.

How do I block TCP connection? ›

Block or allow TCP/IP port in Windows Firewall
  1. Step 1: Block port in Windows Firewall. ...
  2. Step 2: Select Inbound Rules. ...
  3. Step 3: Select the 'New Rule' option. ...
  4. Step 4: Select 'Port' ...
  5. Step 5: Click Next. ...
  6. Step 6: Select 'Block the connection' ...
  7. Step 7: Select all the profiles available.
Jan 17, 2019

How do I disable TCP in Windows? ›

Step 1: Open control panel Step 2: Navigate to programs and features. Step 3: Click on "Turn Windows features on or off. Step 4: Disable "Simple TCP/IP services"Step 5 : Click ok.

How do I protect my TCP ports? ›

To ensure port security, it is recommended to perform port scanning regularly, prioritize monitoring services, disable ports that are not being used, and perform port traffic filtering in order to block or allow incoming and outgoing packets on the network.

How do I close TCP connections in Windows? ›

You can close established TCP/IP connections (those labeled with a state of ESTABLISHED) by selecting File|Close Connections, or by right-clicking on a connection and choosing Close Connections from the resulting context menu. You can save TCPView's output window to a file using the Save menu item.

Top Articles
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 6676

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.