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.
In the input box, type: wf.msc
and click OK. This will open the Windows Firewall with Advanced Security interface.
Click on Inbound Rules.
Click on New Rule. This opens the New Inbound Rule Wizard, which will guide you through adding your new firewall rule.
To begin creating an IP block rule, select the radio button next to Custom. Then press Next.
Now, make sure the radio button for All programs is selected and click Next.
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.
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.
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.
Select the radio button next to Block the connection and click Next.
For most IP blocks, you’ll want to make sure all three boxes are checked: Domain, Private, and Public.
Name your rule. You can keep adding IP addresses to this rule, so make sure you name it something memorable! Then click Finish.
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.
Leave A Comment?