This rule ensures that security groups restrict access on common ports from all sources.
Rule | VPC security groups should restrict ingress access on ports 20, 21, 22, 3306, 3389, 4333 from 0.0.0.0/0 |
Framework | HIPAA |
Severity | ✔ High |
Rule Description
This rule states that the security groups within the VPC should restrict the ingress access on specific ports (20, 21, 22, 3306, 3389, and 4333) from the IP range 0.0.0.0/0. This rule is applicable to ensure compliance with the HIPAA (Health Insurance Portability and Accountability Act) regulations, which aim to protect sensitive health information.
Troubleshooting Steps
If there are any issues related to the security group configuration, follow these troubleshooting steps:
Necessary Codes
Here are the necessary codes to implement the ingress access restrictions within the VPC security groups:
Resources:
MySecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: MySecurityGroup
GroupDescription: Security group for HIPAA compliance
VpcId: vpc-12345678
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 20
ToPort: 20
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 21
ToPort: 21
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 3306
ToPort: 3306
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 3389
ToPort: 3389
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 4333
ToPort: 4333
CidrIp: 0.0.0.0/0
You can use the above CloudFormation (AWS CloudFormation) template code to create a security group that complies with the ingress access restrictions mentioned.
Step-by-Step Guide for Remediation
Follow these step-by-step instructions to remediate the ingress access to the specified ports from 0.0.0.0/0 within the VPC security groups:
By following these steps, you can implement the necessary ingress access restrictions on specified ports within the VPC security groups for HIPAA compliance.