Site icon WindowsLoop

How to Block Website or IP Address in Windows Firewall

Featured-311020

Windows Firewall gives you a simple way to block any website URL or IP address. Here’re the exact steps you should follow to do so.

Just like any other operating system, Windows 10 doesn’t block any website. As long as you have a browser, you can access any website you want without any restrictions whatsoever. However, there might be times when you need to block a specific website, URL, or IP address. For example, if you want to block a specific social media site or some such, you can use the built-in Windows Firewall to block it. You don’t have to use any third-party blocking software. This is especially useful for family PC where it is common to share the computer with children.

So, without further ado, let me show you the steps to block a website URL or an IP address in Windows Firewall.

Steps to Block Website or IP Address with Windows Firewall

To block a website with Windows Firewall, you need to know its IP address(s). This is because Windows requires an IP address and doesn’t directly support the URLs. If you already have an IP address, follow the steps from the second section.

Find the IP Address of a Website

The first thing we need to do is find the IP address of a website. Thankfully, Windows has a built-in command called NSLookup that gives you the IP address of any website. There are the steps you should follow.

  1. First, open the Command Prompt window. You can search for it in the Start menu.
  2. After opening the CMD window, execute the below command. Replace “example.com” with the actual website address you want to block.
    nslookup example.com
  3. You will see the IP addresses next to “Addresses”.
  4. Depending on the website, the command might show multiple IP addresses. In my case, I got 2 IP addresses for example.com.
  5. To make things easier, I recommend you note down those IP addresses in a text file.

Once you have the IP addresses, follow the next section to block the IP address in Windows Firewall.

Block IP Address in Windows Firewall

  1. Open the Start menu.
  2. Search and open “Windows Defender Firewall” in the Start menu.
  3. Click on the “Advanced Settings” link on the left panel.
  4. Right-click on the “Outbound Rules” option on the left panel.
  5. Select the “New Rules” option.
  6. Choose the “Custom” option and click “Next“.
  7. Select the “All Programs” option and click “Next“.
  8. Select “Any” from the “Protocol type” dropdown menu.
  9. Click “Next” to continue.
  10. Select the “These IP addresses” option under the “Remote IP Addresses” section.
  11. Click the “Add” button under the same section.
  12. Select the “This IP address or subnet” option.
  13. Type the IP address in the field and click “Ok“.
  14. If you have multiple IP addresses, follow steps 11 through 13 to add them. In my case, I added two IP addresses.
  15. After adding the IP addresses, click “Next” to continue.
  16. Here, select the “Block the connection” option and click “Next“.
  17. Now, select all the checkboxes and click “Next“.
  18. Name the rule however you want.
  19. Click “Finish“.
  20. You can see the newly added rule in the main window.

From now on, Windows Firewall will block the IP Addresses and the website in Windows 10 according to the configured rule. If anyone tries to access the blocked website or IP addresses, they will be greeted with “Your Internet access is blocked” or “Windows Firewall is blocking the IP address/website” message.

If you want to unblock the website or IP address in Windows Firewall, follow steps 1 through 3 in section two, find the specific rule, right-click on it, and select the “Disable Rule” option. When needed, you can also delete the rule by selecting the “Delete” option.

That is all. I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article, check out how to block all outgoing connections in the Windows firewall.

Exit mobile version