Firewall Windows

Introduction

This article is about a firewall. Windows firewall Linux read here

How to prevent a computer from accessing a certain IP

The algorithm is:

How to find out the IP site

To find out the IP we press

Win + R

write

cmd

cmd

The console will open, we will write in it.

ping site_name

ping

If you need to know your IP address, you can do it. here

Let's move on to the next step.

How to Configure Windows Firewall

Windows + R

then write

WF.msc

To launch the Firewall

WF.msc www.aredel.com
WF.msc
www.aredel.com

Choose. Outbound Rules press on New Rule Right in the Actions section.

WF.msc www.aredel.com
WF.msc
www.aredel.com

Choose. Custom Rule and press on Next

WF Custom Rule www.aredel.com
WF Custom Rule
www.aredel.com

Next

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

Next

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

We choose which internal and external IPs we want to block. Press. Add..

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

And enter addresses by one or range.

In this example, we decided for some reason. block 31.31.196.225



To find out the IP of the site that you need to block

WIN + R → cmd → ping

IP can be of two types:
11.22.33.222 IPv4
and
2001:1bd8:101:ee81:3c82:641b:3748:42ff IPv6
- a newer format.

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

We make sure that our address is displayed and clicked Next.

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

We choose what we want to do with the IP address we selected.

In our case, this is Block

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

Next

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

We're coming up with a name for our rule.

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

We are convinced that the rule appeared on the outgoing list.

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

FAQ:

If the rule doesn’t work, check if the firewall is on.

In the case on the right, there are two problems at once: the Firewall is not only turned off, so It is also controlled centrally by the sysadmin.

WF Custom Rule to block IP at www.aredel.com
WF.msc
www.aredel.com

Remember, Firewall applies rules to new connections if you're already somewhere. Once connected, the rule will not break the existing connection.

How to check if the site is blocked

Try going in there.

Open the port in Windows Firewall

Search for Firewall and select Windows Defender Firewall. Create a new Inbound rule.

In different versions of Windows, the path may vary. On how to open the port through PowerShell read here

Control Panel → System & Security → Windows Defender Firewall → Advanced Settings → Inbound Rules → New Rule

Or

Control Panel → System & Security → Windows Firewall → Inbound Rules → New Rule

Open the port in windows firewall image from www.aredel.com
WF.msc
www.aredel.com

Port

Open the port in windows firewall image from www.aredel.com
WF.msc
www.aredel.com

Specific Local Port – This example opens port 3389, a standard port for RDP.

Open the port in windows firewall image from www.aredel.com
Opening the RDP port
www.aredel.com

Allow the connection

Open the port in windows firewall image from www.aredel.com
WF.msc
www.aredel.com

Next

Open the port in windows firewall image from www.aredel.com
WF.msc
www.aredel.com

Allow ping

Control Panel → System & Security → Windows Defender Firewall → Advanced Settings → Inbound Rules

Or

Control Panel → System & Security → Windows Firewall → Inbound Rules

Allow ping of Windows Server incoming www.aredel.com
Find Firewall from Search
www.aredel.com

Choose. File and Printer Sharing (Echo Request - ICMPv4-In) and press Enable Rule

Allow ping of Windows Server firewal incoming www.aredel.com
File and Printer Sharing (Echo Request - ICMPv4-In)
www.aredel.com

The result

Allow ping of Windows Server firewal incoming www.aredel.com
File and Printer Sharing (Echo Request - ICMPv4-In)
www.aredel.com

Article author: Andrei Olegovich

Banner image