The following article will assist you in blocking a single IP address or a range of IP addresses in the default firewall of Windows Server 2008 R2 OS.
- Login to your VPS via RDP. Please refer to how to login to your VPS using RDP.
- Click on Start >> Administrative Tools >> Windows Firewall with Advanced Security.
- From the left pane of the Firewall window, click on the Inbound Rules option.
- From the right pane, click on New Rule.
- A New Inbound Rule Wizard will be opened. Here, click on the Custom button and then click on Next.
- Make sure that the All Programs option is selected. Then, click on Next.
- In the Protocol and Ports wizard, leave all the options at its default and click Next.
- In the Scope wizard, you will see two boxes. The first one is for local IP addresses, and the second is for remote IP addresses. In this scenario, we are trying to block an outside (remote) IP address from accessing anything on the server, so we will need to add the IP address to this section only, as it will not be a local IP address.
- Click on the second option that says These IP addresses in the remote section. Click on the Add button. In the next window, we will add a single IP address to the rule. You can also add an entire range at this point if you wish. After adding IP address(es), click on OK and then click on Next.
- Select Block the connection option from the Action wizard and then click Next.
- Leave all of the options checked in the Profile wizard. This will block the IP address, no matter the connection they are trying to use. Then, click on Next.
- Mention the "name of the rule" in the Name wizard (it can be something you can remember in case you wish to remove or edit it in the future). Click on Finish.