Fix it

A security group is open to the whole internet

A rule open to 0.0.0.0/0 on SSH, RDP or a database port can be reached by anyone. This is how to list those rules and close them.

AWS details read from the AWS docs on 28 November 2026. Each one links to its page.

What AWS says

  • A new security group has no inbound rules, so no inbound traffic is allowed until you add rules. A source of 0.0.0.0/0 allows traffic from the internet. AWS docs
  • AWS Systems Manager Session Manager provides secure node management without the need to open inbound ports. AWS docs

Find it in your account

Print every security group as JSON, then look for 0.0.0.0/0 or ::/0 on port 22, 3389, 3306, 5432 or another admin or database port. AWS docs

Run this
aws ec2 describe-security-groups --output json

Check your security groups in the browser. It runs in your browser and uploads nothing.

Fix it

  1. Remove the open rule. AWS recommends describing the group afterwards to check the rule is gone. AWS docs
    Run this
    aws ec2 revoke-security-group-ingress --group-id sg-XXXX --protocol tcp --port 22 --cidr 0.0.0.0/0
  2. If you still need access, add the rule back for your office or VPN range only. For SSH, Session Manager needs no inbound port at all. AWS docs

What OpsAgent flags

OpsAgent runs check 03 against your AWS account every night and flags:

  • Critical: a group open to 0.0.0.0/0 or ::/0 on an admin or database port (22, 3389, 3306, 5432, 1433, 27017, 6379, 9200, 5601, 11211, 2375).
  • Info: a group open to the world only on other ports, such as 80 and 443 for a public web server.
  • It checks the 15-minute urgent set, so a newly opened port is flagged within about 15 minutes, not the next morning.

What OpsAgent does not do here

  • The free checker on this site does not know what a group is attached to. OpsAgent in your account does, and ranks a group on an instance or interface above one on nothing.
  • It never edits a security group. It connects read-only; you run the command above.

Get your ops teammate.

Start a 14-day free trial. Card required, cancel any time.

Start free trial