Aws-Ec2 Security Groups Use-case Challenge -Solution
Solution
Console
1 . Go to EC2 service - > Click on "Security Groups" under "Network & Security" You should see at least one security group. One of them is called "default"
2 . Click on the security group with HTTP rules and click on "Edit inbound rules". Remove the HTTP-related rules and click on "Save rules"
3 . No. There is a time-out because we removed the rule allowing HTTP traffic.
4 . Click on the security group -> edit inbound rules and add the following rule:
- Type: HTTP
- Port range: 80
- Source: Anywhere -> 0.0.0.0/0
5 .yes
CLI
1 .Aws Ec2 describe-security-groups -> by default, there is one security group called "default", in a new account
2 . Remove the rule: Aws Ec2 revoke-security-group-ingress \
- --group-name some HTTPSecurityGroup
- --protocol TCP \
- --port 80 \
- --CIDR 0.0.0.0/0
3 . No. There is a time-out because we removed the rule allowing HTTP traffic.
4 . Add the rule we remove:
- AWS Ec2 authorize-security-group-ingress \
- --group-name some HTTPSecurityGroup
- --protocol TCP \
- --port 80 \
- --CIDR 0.0.0.0/0
5 .yes