How to block IP addresses using windows firewall on Windows Server

Configurare noua (How To)

Situatie

Your Windows server has a Windows firewall to help prevent malicious attacks. This firewall looks at anything attempting to access your server and compares it to a set of rules. If it breaks the rules, your firewall doesn’t let the traffic through.

Your firewall can also block certain IP addresses from connecting to your server. On a Windows server, you do this by logging into your server via RDP and creating a new firewall rule listing the IP addresses you want to block.

Solutie

Pasi de urmat
  • Log into your windows server using RDP.
  • Right click on the start icon and click Run.

opening the execute menu

In the input box, type: wf.msc

advanced security interface

and click OK. This will open the Windows Firewall with Advanced Security interface.

Click on Inbound Rules.

adding a new rule

Click on New Rule. This opens the New Inbound Rule Wizard, which will guide you through adding your new firewall rule.

Clicking on New Rule

To begin creating an IP block rule, select the radio button next to Custom. Then press Next.

selecting a custom rule

Now, make sure the radio button for All programs is selected and click Next.choosing all programs

The next screen asks you which ports and protocols your rule will apply to. Generally, with an IP block, you will leave this screen as it is, with the Protocol type set to Any. Click Next.

setting protocol type

Now you can block the IP addresses. Look for the section with the header Which remote IP addresses does this rule apply to? Select the radio button next to These IP addresses.

selecting IP addresses to block

Click Add. Type in the IP address you want to block and click OK. Repeat this for any IP addresses you want to block. You can also block IP address ranges. Once you’ve added all the IPs you want to block, click Next.

adding specific IPs

Select the radio button next to Block the connection and click Next.

blocking the IPs

For most IP blocks, you’ll want to make sure all three boxes are checked: DomainPrivate, and Public.

deciding what this block applies to

Name your rule. You can keep adding IP addresses to this rule, so make sure you name it something memorable! Then click Finish.

naming your rule

You’ve successfully added a rule in Windows Firewall to block any IPs you don’t want accessing your server! If you ever need to add more IPs to this rule, double click on the rule to open the rule properties and click Scope. Then add new IP addresses just like you added them before.

Tip solutie

Permanent

Voteaza

(4 din 9 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?