This article shows you how to prevent a program from being able to access a Windows computer from the network by using the operating system's Firewall. You must be the system administrator to be able to change the Windows Firewall configuration settings. It should be noted that normally blocking a program using the Windows Firewall does not prevent it from running.
Steps
Method 1 of 2: Lock a Program
Step 1. Access the "Start" menu by clicking the icon
It features the Windows logo and is located in the lower left corner of the desktop.
Step 2. Log in to the Windows Firewall
Type the keywords Windows Defender Firewall into the "Start" menu, then select the icon Windows Defender Firewall appeared at the top of the results list.
Step 3. Select the Advanced Settings link
It is located in the upper left part of the appeared window.
Step 4. Choose the Outbound Connection Rules option
It is located inside the left sidebar of the "Windows Defender Firewall with Advanced Security" window.
Step 5. Choose the item New rule…
It is located in the "Actions" sidebar on the right side of the window. The dialog for creating a new Firewall rule will appear.
Step 6. Select the "Schedule" radio button
It should be the first option at the top of the page.
Step 7. Press the Next button
It is located at the bottom of the window.
Step 8. Select the program to block
Before being able to block software communications, it is necessary to identify its complete path, i.e. the folder in which it is stored:
- Select the "Program Path" option, then press the button Browse …;
- Click the entry This PC placed inside the left sidebar of the appeared window;
- Go to the "Devices and Drives" section, then double-click your computer's main hard drive icon (Acer (C:));
-
Access the folder Programs by double clicking the relative icon with the left mouse button;
If the program you want to block is installed somewhere else on the disk, go to that folder
- Locate the directory where the executable file of the program in question is present, then double-click on its icon;
- Select the program file with a mouse click.
Step 9. Copy the full path of the folder under consideration
Select the address bar at the top of the window, then press the key combination Ctrl + C.
This step is necessary because Windows changes the path structure of the selected file causing the rule you are creating to fail. To work around this problem you will have to manually paste the full path of the file in the appropriate field
Step 10. Press the Open button
It is located in the lower right corner of the dialog box.
Step 11. Replace the path that appeared automatically with the one you copied in the previous step
Select the text visible in the "Program Path" field until you get to the backslash ("\") before the application name, then press the key combination Ctrl + V.
- For example, if you have chosen to block Chrome network communications whose path is "C: / Program Files / Google / Application / chrome.exe", you will have to select all the text except the "\ chrome.exe" portion and replace it with the copied path.
- For the Firewall rule you are creating to work correctly, the program name and its extension must be present at the end of the path of the selected file. Otherwise the program in question will not be blocked.
Step 12. Press the Next button three consecutive times
It is located at the bottom right of the current dialog box. This will take you to the final screen of the wizard for creating a new Firewall rule.
Step 13. Name the new rule
Type it inside the text field located in the center of the window. You can choose the name you prefer.
For example, if you have created a rule to block outbound Chrome connections, you might use the following name "Chrome_Block"
Step 14. Press the Finish button
It is located in the lower right part of the window. This way the new rule will be created and activated. From this moment on (ie until the rule in question is disabled or deleted) the selected program will not be able to access the web.
Method 2 of 2: Temporarily Disable Running a Program
Step 1. Access the "Start" menu by clicking the icon
It features the Windows logo and is located in the lower left corner of the desktop. Alternatively, press the ⊞ Win key on your keyboard.
Step 2. Log in to the Windows Firewall
Type the keywords Windows Defender Firewall into the "Start" menu, then select the icon Windows Defender Firewall appeared at the top of the results list.
Step 3. Select the Allow an app or feature through Windows Defender Firewall link
It is located in the upper left of the Windows Firewall window.
Step 4. Press the Change Settings button
It is located in the upper right of the new page that appeared above the list of allowed applications and features.
- You may need to press the button to continue Yup present in the Windows User Account Control pop-up window.
- If you are not using a system administrator account, you will not be able to perform the operations described in this section of the article.
Step 5. Find the program you want to block
In the center of the page is a list of all programs that Windows Defender Firewall can block or allow. Scroll through it to find the application you are interested in.
Step 6. If necessary, add the program under consideration to the existing list
If the program you are looking for is not included in the list, you will need to add it manually by following these instructions:
- Push the button Allow another app … placed under the list of programs managed by the Windows Firewall;
- Push the button Browse …;
- Access the folder where the program or application you want to block is stored (normally it is an executable file in EXE format);
- Select the app or program file in question;
- Push the button You open, select the program name from the appeared window, then press the button add (this last step is necessary only if the program is not added automatically due to the presence of multiple files in the indicated folder);
Step 7. Uncheck the check button on the left of the program name
This way the check mark inside it should disappear. All communication of the chosen app will be blocked by the Windows Firewall.
- If the check button in question is not selected (ie a check mark is not visible inside it), it means that the Windows Firewall is already blocking the execution of the program.
- Leave the two check buttons on the right of the name of the program in question selected ("Private" and "Public").
Step 8. Press the OK button
It is located at the bottom of the window. The new settings will be saved and applied and the selected program will not be able to run on your computer.
Advice
- Blocking a program using the Windows Firewall is a good way to prevent malware or bloatware from slowing down the normal functioning of the system.
- If you don't know the folder where the program you want to block is stored, select its shortcut icon with the right mouse button, then choose the option Open file path from the context menu that appeared.