logo

How to Block File Sharing Windows Firewall: A Complete Guide

File sharing is a convenient feature in Windows that allows users to share files over a local network. However, for security reasons, you might want to disable or block file sharing on your computer. Blocking file sharing can prevent unauthorized access and ensure that your sensitive data remains secure. In this comprehensive guide, we will explain **how to block file sharing using Windows Firewall**, the steps involved, and the benefits of doing so.

Why You Might Want to Block File Sharing

Blocking file sharing with Windows Firewall can enhance the security of your computer. When file sharing is enabled, your files can be accessed by other computers on the same network. This can expose your system to security vulnerabilities, especially if you’re on a public network or a network with unauthorized users. By blocking file sharing through Windows Firewall, you can limit access to your computer, ensuring that only trusted users can access your files.

Prerequisites for Blocking File Sharing in Windows

Before we dive into how to block file sharing with Windows Firewall, let’s first understand the prerequisites:

  1. **Administrator Privileges**: You will need administrator access to your computer in order to make changes to the firewall settings.
  2. **Windows Firewall Enabled**: This guide assumes that you have Windows Firewall enabled. If not, you can enable it through the Control Panel or Settings.

Step-by-Step Guide on How to Block File Sharing Using Windows Firewall

Follow these steps to block file sharing on your Windows machine:

Step 1: Open Windows Firewall Settings

  1. Click on the **Start menu** and type “Windows Firewall.”
  2. Select **Windows Defender Firewall** from the search results.
  3. On the left panel, click on **Advanced settings**. This will open the Windows Firewall with Advanced Security window.

Step 2: Create a New Inbound Rule

  1. In the **Windows Firewall with Advanced Security** window, click on **Inbound Rules**.
  2. On the right panel, select **New Rule** under the Actions section.
  3. In the New Inbound Rule Wizard, choose **Port** as the rule type and click **Next**.

Step 3: Block File Sharing Ports

File sharing relies on specific ports to allow communication between computers. To block file sharing, you need to block these ports:

  1. In the Port section, choose **TCP** and then select **Specific local ports**.
  2. Enter the following ports: **445, 139, 137, 138**. These are the ports used by Windows file sharing (SMB).
  3. Click **Next**.

Step 4: Choose “Block the Connection”

  1. In the next window, select **Block the connection** and click **Next**.
  2. Ensure that all three profiles (Domain, Private, Public) are selected, depending on which network you want to block file sharing on. If you want to block it across all networks, leave all profiles checked.
  3. Click **Next**.

Step 5: Name the Rule

  1. Give your rule a meaningful name like **Block File Sharing**.
  2. Optionally, provide a description for the rule (e.g., “This rule blocks file sharing on the network”).
  3. Click **Finish** to apply the rule.

You’ve now successfully blocked file sharing on your Windows computer using Windows Firewall!

Step 6: Confirm the Rule is Active

After creating the rule, it’s important to confirm that file sharing is blocked. You can test this by trying to share a file on your network. If you can no longer access shared files, the rule is working correctly.

Benefits of Blocking File Sharing Using Windows Firewall

– **Enhanced Security**: By blocking file sharing, you prevent unauthorized access to your computer over the network.

– **Network Protection**: Reduces the risk of malware spreading through shared files.

– **Controlled Access**: Only trusted users can access shared files when needed, ensuring your system is more secure.

Alternative Methods to Block File Sharing

While blocking file sharing using Windows Firewall is a highly effective method, there are other ways you can prevent file sharing, such as:

  1. **Disabling SMB**: Disable the SMB protocol on your computer. SMB is the protocol used for file sharing in Windows.
  2. **Using Group Policy**: For more advanced users, you can disable file sharing using Group Policy Editor on Windows Pro and Enterprise editions.

Troubleshooting

If you’re unable to block file sharing after following these steps, ensure that:

– **Firewall is Active**: Check that Windows Firewall is enabled.

– **Ports are Correct**: Verify that the correct ports (445, 139, 137, 138) are being blocked.

– **No Conflicting Rules**: Ensure there are no conflicting inbound or outbound rules that allow file sharing.

Acer Aspire 12th Gen Intel Core i7-12700 Processor Desktop

how to block file sharing windows firewall

About this item

  • Processor: Intel H610 Core i7-12700 Processor Express Chipset (Total Core – 12, Burst Frequency 4.90 GHz, Base Frequency 2.10 GHz, 25 MB Smart Cache, 12 MB L2 Cache)
  • Internal Specifications: 16 GB RAM Upgradable up to 64 GB
  • Storage: 512 GB SATA SSD
  • Warranty: 3 Year Comprehensive Warranty, Microsoft Office Pre-installed
  • Connectivity : Intel I219V 10/ 100/ 1000 Mb/s auto negotiation, Half / Full duplex capability, Support WiFi 6

FAQ

Blocking file sharing will prevent other computers on the same network from accessing files on your computer, providing more security.

To unblock file sharing, go back to the **Inbound Rules** in Windows Firewall and disable or delete the rule you created to block file sharing.

Yes, when creating the rule, you can choose which network profiles (Domain, Private, Public) the rule applies to.

Blocking file sharing is a good step towards securing your PC, but you should also enable other security measures like antivirus software and regular system updates.

No, blocking file sharing should not affect your internet speed. However, if you are actively using file sharing, blocking it may stop certain network-related tasks.

Leave a Reply

Your email address will not be published. Required fields are marked *