Tips on How to Restrict Access to Your Server Using Windows Firewall. Of all the security levels on the server, the most you need to pay attention to on your server is the port. In these days, it's easier to manage services and applications on your server with a remote PC. This means opening a port for this service so you can connect to the server, but by opening the port, that means you should also be alert to the various risks that may occur / the target of hacker attacks. Some common services that you may find openly are Remote Desktop (RDP), FTP, and SQL. RDP access is definitely something you have if you have your own cloud server. FTP is a tool that people use to upload files to their servers for their sites. You can also connect SQL remotely from your local computer to the server. The attackers may not know the credentials you used to connect, but that does not prevent them from always trying to figure out how to break into your server.
You can review the hack attempt in the Event Viewer server by filtering the Security log for Event ID 4625 (RDP and FTP attempts) and in the Application log for Event ID 18456 (SQL Attempts). You can also review your FTP logs and search for "PASS 530 ***" event. 530 status code shows failed login attempt. The various options available to protect your service from this attack, one of which is using VPN (Virtual Private Networking) is a general and effective solution, and depends on how much you need. But there's an easier option too, you can use Windows Firewall on the server to block IPs that you think are malicious or unwilling to attack your server. In this article I want to explain how you can limit RDP access to your server, FTP and SQL services based on your computer's IP address. Now only registered IP addresses will have access to RDP to the server and all others will be blocked. To restrict access to FTP you will follow the same steps for the "FTP Server (FTP Traffic-In)" rule. If you have rules in place to allow you remote access via SQL Server Management Studio you can apply the same steps for that rule as well.