Restricting Access to File Sharing by IP addresses in Windows 11

July 5, 2022

Home » Blogs » Network » Restricting Access to File Sharing by IP addresses in Windows 11

Restricting access to file-sharing will improve data security and prevent ransomware attacks.

File sharing is a commonly used method in organizations by utilizing available networks. There are various ways of doing file sharing, ranging from cloud-based ones to the simplest with two PCs.

In organizations with a local network (LAN), you can file sharing by storing files on a server. Then access to the file can be set based on the user and access rights.

In this article, Bardimin will discuss how to do file sharing on a PC. Since we don’t want everyone in the organization to access, the file being filtered, we’re going to limit the file to only being accessible to A PC with a specific IP address.

Advantages of File Sharing

1. Save Time

PC users in the organization don’t need to email files, upload, or download files using the internet. Instead, they can quickly access directly the files they need when they need them. File sharing transfers are much faster than sending over the internet since file sharing uses a local network at a much faster speed. Transfer speeds can reach 1Gb/s – 10 Gb/s, depending on the device used.

2. Save Money

Because it does not use the internet, file sharing will reduce the cost of using the internet.

TOP TUTORIALS:  How to Remove Startup Programs – Prevent programs from automatically running in Windows 11

3. Prevent Data Loss

In file-sharing that uses a server, you can back up data regularly. And in the event of a crash on a PC, the data is not lost because it is still on the server.

4. Restricting Access

You can restrict access to a file whether it can only read, update, delete, create or save.

Disadvantages of File Sharing

1. Requires Local Network (LAN)

To use file sharing properly requires a stable network. File sharing will run well with the local network using a cable. Using Wi-Fi is also possible, but it will have a lower transfer speed and are less stable than using a cable.

2. Higher Risk of Infected Files

There is an increased risk of files being infected by malware, ransomware, and viruses. Because if one of the PCs is infected and accesses the file, there is a possibility of a virus spreading. By keeping Windows and antivirus up to date, this risk can be reduced.

How to Enable File Sharing in Windows 11

  1. Open the Windows “Settings“. You can open Settings by using the keys (WIN + I).
  2. Then select “Network & internet > Advanced network settings > Advanced sharing settings“. Then, on “File and printer sharing“, slide the switch button to the right to activate.  Enable this feature on “Private Network” and “Public Network“.
file sharing turn on
  1. Then on “All Network“, you can turn off password sharing (because we will filter by IP address).
file sharing turn off password

How to Share a Folder in Windows 11

After you activate File Sharing, your PC can already be accessed by other PCs. Since there is no folder that you are sharing yet, when accessed by another PC through File Explorer, it will appear empty.

  1. Open “File Explorer” and select the folder you want to share.
  2. Then right-click on the folder and select “Properties“.
  3. In the Properties window, select the “Sharing” tab and then click on the “Advanced Sharing” button.
TOP TUTORIALS:  How to Enable or Disable the Archive App in Windows 11
folder sharing properties
  1. Next, you check “Share this folder” and you can name the share or leave it as default. Then click the “Permissions” button to set the access.
folder sharing permissions
  1. Arrange access to the folder the way you want.

How to Access Windows File Sharing

To access File sharing, you can do it through File Explorer. You can type the IP address in the address bar. You also type the name of the PC, not all LAN network topology can use the PC name.

For example, you can access it by typing the IP address as follows

\\192.168.1.1
folder sharing ip

RestrictIng File Sharing Access with Windows Firewall

If you have completed all the steps mentioned above, you have successfully shared a folder. The problem is that all PCs connected to the LAN network will access the folder.

In this step, we will restrict access using the Firewall and only allow certain IP addresses that can access it.

  1. Go to the “Control Panel” and select “System and Security > Windows Defender Firewall > Allowed apps“.
firewall app
  1. Then, in the “Allowed apps” window, click the “Change settings” button. You won’t be able to change the settings if you don’t click this button first.
  2. Uncheck “File and Printer Sharing” and “File and Printer Sharing over SMBDirect” to block all access.
TOP TUTORIALS:  How to Display Day and Month on the Windows 11 Taskbar Completely
firewall disable sharing
  1. Then open the “Control Panel” again and select “System and Security > Windows Defender Firewall > Advanced settings”.
  2. In the “Windows Defender Firewall with Advanced Security” window, select “Inbound Rule“. Then right-click and select “New Rule“.
firewall new rule
  1. Next will open the window “New Inbound Rule Wizard“. In the “Rule Type“, select “Custom” and then click the “Next” button.
  2. Then on “Programs“, select “All programs“. Click the “Next” button.
  3. In the “Protocol and Ports” step, select the “TCP” protocol. And at the local port, select “Specific Ports” with the port number “445“. Next click on the “Next” button.
firewall port setting
  1. Then in the “Scope” step, Remote IP section, add the IP of another PC that you allow to access file sharing on your PC.
firewall remote ip
  1. In the “Action” step, select “Allow the connection“. Then click the “Next” button.
  2. And in the “Profile” step, leave everything selected and click the “Next” button.
  3. The last step is to name the Rule you created. Give it a name that makes it easier for you to recognize it, such as “File Sharing – Allow specific IP”.
firewall allow specific ip

You can already restrict file sharing access with only certain IP addresses that can access it.

0 Comments

Submit a Comment