VPC Security Groups Flashcards

1
Q

What is a Security Group in AWS?

A

A Security Group acts as a virtual firewall for your EC2 instances to control inbound and outbound traffic. In AWS, Security Groups are associated with instances, providing security at the protocol and port access level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do Security Groups work in AWS?

A

Security Groups in AWS work by allowing you to specify allow rules, but not deny rules. Traffic that does not match an allow rule is automatically denied. They are stateful, meaning if traffic is permitted in one direction, the return traffic is automatically allowed, irrespective of other rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does a Security Group differ from a Network Access Control List (NACL)?

A

Security Groups differ from NACLs in that they are stateful and instance-level, whereas NACLs are stateless and subnet-level. Security Groups control access to EC2 instances, while NACLs control access to subnets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can a Security Group rule reference another Security Group?

A

Yes, a Security Group rule can reference another Security Group. This allows one Security Group to allow or deny traffic based on the membership of another Security Group, facilitating dynamic, membership-based security rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are Security Group rules evaluated?

A

Security Group rules are evaluated as a whole, in no specific order. If there is an allow rule for a specific type of traffic, that traffic is allowed to or from the instance, regardless of other rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What types of traffic do Security Groups control?

A

Security Groups control inbound and outbound traffic for an EC2 instance. This includes TCP, UDP, ICMP, and other protocol types, distinguished by source and destination IP addresses, ports, and the protocol used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you modify Security Group rules?

A

Security Group rules can be modified at any time. The new rules are automatically applied to all instances associated with the Security Group without disrupting the instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is it possible to block specific IP addresses with Security Groups?

A

No, Security Groups in AWS do not support deny rules. They are based on whitelisting allow rules only. To explicitly deny traffic from specific IP addresses, consider using NACLs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can an EC2 instance belong to multiple Security Groups?

A

Yes, an EC2 instance can be associated with multiple Security Groups. The instance receives the combined set of allow rules from each of the Security Groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What happens when a Security Group is deleted in AWS?

A

When a Security Group is deleted, any instance associated with the Security Group will no longer have the rules of the deleted Security Group applied to it. If an instance is not associated with any other Security Group, it will be associated with the default Security Group of the VPC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly