Firewall rule builder
Create and review several ports and sources together.
DIRECTION
Quick add
DESCRIPTIONPROTOCOLPORT FROMPORT TOIPV4 CIDRIPV6 CIDR
aws ec2 create-security-group --group-name web-security --description "Managed by NetOpsT" --vpc-id vpc-0123456789abcdef0 --region eu-west-1
# Save the returned GroupId as SECURITY_GROUP_ID
aws ec2 authorize-security-group-ingress --group-id $SECURITY_GROUP_ID --ip-permissions '[{"IpProtocol":"tcp","FromPort":443,"ToPort":443,"IpRanges":[{"CidrIp":"0.0.0.0/0","Description":"allow-https"}],"Ipv6Ranges":[{"CidrIpv6":"::/0","Description":"allow-https"}]}]' --region eu-west-1
aws ec2 authorize-security-group-ingress --group-id $SECURITY_GROUP_ID --ip-permissions '[{"IpProtocol":"tcp","FromPort":22,"ToPort":22,"IpRanges":[{"CidrIp":"10.0.0.0/8","Description":"allow-ssh"}]}]' --region eu-west-1Security noteRules generated here allow traffic. Keep sources narrow, review IPv6 separately and confirm priorities. AWS Security Groups do not support deny rules.