You can use this article to allow or whitelist only a specific IP address on a port.
If you wish to limit access to your Remote Desktop Protocol port to only your local IP address, you can easily do so. This will ensure that only your local IP address can connect to your server and all other IP addresses are denied access.
You can also grant access to the same IP address to multiple ports on the same server. Providing access from a single IP address to multiple ports on the same server is possible. You can improve the security of your servers by limiting access to specific IP addresses.
Find the step-by-step guide to enable ports for a specific IP address on your Windows VPS or Dedicated Server.
1. Log in to the server using RDP. For more details, refer to how to connect VPS using RDP from different OS.
2. Click on Start >> Administrative tools >> Windows Firewall with Advanced Security.
3. Go to Inbound Rule >> New Rule
4. Click on Custom, and on the next page, select All Programmes.
5. You are at Protocol & Ports wizard.
- Select the Specific Port option for the Remote Port, enter the port number, and click Next.
- Here, we have used Non-standard RDP Port 5000.
6. You will need to enter the Remote IP Address by which you want to connect your port.
- Click on the Add Button, enter the IP Address, and click Ok and Next.
7. Select Allow the connection option and click Next.
8. On the Profile Page, select all three options. Domain, Private and Public.
7. Click the Next Button.
8. In the final step, you need to provide the Name of this Rule. (eg. Remote Desktop - IP Restriction Rule)
9. Click on the Finish button.
→ Looking to block IP or IP range on windows firewall? Please refer to Block IPs in Firewall for more details.
→ Looking to enable PING/ICMP on the windows server? Please refer to Enable Ping for more details.
→ Looking to open the firewall port on windows? Please refer to open firewall port for more details.
→ Looking to know about recommended ports in windows firewall? Please refer to recommended firewall port for more details.