I have an AWS virtual machine running a web application on IIS that connects to a SQL Server database (on the same machine). Recently, I have noticed that there are a plethora of failed login attempts on my SQL Server database, presumably from scripts which are trying to brute force the SA account.
I decided that this is no big deal, I will just use Windows Firewall to block incoming TCP requests on Port 1433 (the port that SQL Server uses). However, after adding the inbound security rule, I noticed that my web application no longer works. It's as if the rule is blocking the web application from accessing SQL Server, but this seems strange to me because both the web application and the SQL Server database are running on the same virtual machine - why would Windows Firewall affect it?
Sure enough, when I disable the newly added rule, the web application is working again. Can anyone help explain to me what's going on here? Maybe I am misunderstanding how Windows Firewall works.