Skip to content

AWS Security Group vs Windows Firewall

Understanding the two separate layers of firewall filtering that both need to allow traffic on an AWS-hosted Windows instance.

AWS Security Group vs Windows Firewall
Table of Contents
  1. Common Symptoms
  2. Possible Causes
  3. Before You Begin
  4. Method 1 โ€” Confirm the security group rule
  5. Method 2 โ€” Confirm the Windows Firewall rule
  6. Method 3 โ€” Test each layer independently
  7. Frequently Asked Questions
  8. If I open the security group, does that mean Windows Firewall is bypassed?
  9. Conclusion
  10. Related Articles

A Windows Server running on EC2 is protected by two independent firewall layers โ€” the AWS security group at the network level, and Windows Defender Firewall inside the instance itself โ€” and traffic needs to pass both to succeed.

Common Symptoms

  • The security group allows the port, but the connection still fails
  • RDP works from inside the VPC but not from the internet
  • A specific application on the instance can’t be reached even though RDP works

Possible Causes

  • Security group correctly allows the port, but Windows Defender Firewall on the instance blocks it
  • A newly installed application didn’t create its own Windows Firewall rule
  • Confusion about which layer is actually responsible for a given block

Before You Begin

Info

Think of it as two locked doors in sequence: AWS security group is the outer door (network-level), Windows Firewall is the inner door (OS-level) โ€” both need to be unlocked for traffic to get through.

Method 1 โ€” Confirm the security group rule

Check the AWS-level rule

Confirm an inbound rule exists on the instance’s security group for the specific port and source IP range needed.

Method 2 โ€” Confirm the Windows Firewall rule

Check inside the instance

Once connected (e.g. via RDP), open Windows Defender Firewall with Advanced Security and confirm an inbound rule exists for the same port.

Method 3 โ€” Test each layer independently

Isolate which layer is blocking

Temporarily open the security group fully (for testing only, then revert) โ€” if the connection still fails, the block is on the Windows Firewall side, not AWS.

Important

Never leave a security group open to 0.0.0.0/0 on a sensitive port like RDP (3389) โ€” restrict it to a specific known IP range and revert any test changes immediately after diagnosing the issue.

Frequently Asked Questions

If I open the security group, does that mean Windows Firewall is bypassed?

No โ€” the two layers are independent and both need to permit the traffic. Opening the security group only removes the network-level restriction; the instance’s own OS firewall is still evaluated separately.

Conclusion

Treating the security group and the instance’s own firewall as two separate checkpoints โ€” and testing each independently โ€” resolves most “it should be open but still doesn’t work” cases on AWS.

AWS EC2 Instance Not Reachable โ€” Basic Troubleshooting Related Article AWS EC2 Instance Not Reachable โ€” Basic Troubleshooting → Windows Defender Firewall Blocking an Application Related Article Windows Defender Firewall Blocking an Application →

Was this guide helpful?

Share it with someone who needs it, or subscribe for more practical IT tutorials.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get practical IT tutorials in your inbox

No spam โ€” just useful troubleshooting guides and tips.