VPC and Network Security Flashcards

1
Q

What is automatically created when creating a VPC?

A

Creating a new VPC creates a default SG, a default NACL and a route table. Nothing more

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

For what are First 4 and last IP in subnet are reserved?

A

0=network addr, 1=VPC router, 2=DNS server, 3=future use, 255=broadcast

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

How many IGW can each VPC have?

A

1

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

What is the problem because net subnet created is first associated to default route table?

A

so don’t keep a route open to internet in default RT, instead create a new RT, add route out to IGW for Ipv4 and v6, and associate all public subnets to this RT

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

What do subnets by default have disabled?

A

Subnets by default have “auto assign public IP” disabled. Enable it if launching public EC2s in that subnet

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

What do you need to disable because EC2 only allows traffic for which it itself is the source or destination but NAT needs to pass-through traffic from others?

A

Remember to disable “Source/Dest check” on NAT instance (Not needed on NATGW)

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

How do you allow traffic out via NAT?

A

Add a route to default RT in VPC with destination=0.0.0.0/0, target=NAT instance/NATGW

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

How to get IPv4 and how IPv6?

A

NATGW does IPv4
Egress only IGW does IPv6

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

What does ALB at least require?

A

!! ALB requires at least 2 subnets in 2 different AZs to be deployed for a VPC. Cannot have a single AZ ALB

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

What is recommended way for private instances to access S3 etc. without going to internet via NAT?

A

A VPC Endpoint

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

Are NACLS Stateful or stateless?

A

Stateless. have to open inbound and outbound separately.

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

Are Security groups stateful or stateless?

A

Stateful. therefore opening inbound opens outbound ephemeral ports as needed

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

Where do NACL lives?

A

Within one VPC, can be applied to multiple subnets but each subnet can be tied to only one NACL

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

What is difference between new NACL and default NACL?

A

Default NACL for a VPC stats with allow all
New created NACL has all inbound and outbound on DENY

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

How are rules applied in NACL?

A

In order of rule. Lower number wins in conflict –unlike IAM where most restrictive wins

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

Where does CloudHSM need to be created?

A

In same region as VPC and other resources using it

17
Q

WWhat does CloudHSM create?

A

A new SG with ports 2223-2225 (to talk to EC2) so need to open these ports your own SG

18
Q

CloudHSM cluster is created in at least 2 AZ

A
19
Q

How to start CloudHSM?

A

1) Initialize a Hardware Security Module in one of the subnets 2) download a certification signing request (CSR) 3) sign it i.e. generate a private key, create a self-signed cert (public key) using it, sign the CSR using both keys 4) upload the signed certificate and issuing certificate (public key)

20
Q

What are the users in CloudHSM?

A

1) Precrypto Officer (PRECO) is default 2) Crypto Officer (CO) 3) Crypto User (CU) 4) Appliance User (AU)

21
Q

What is a Transit Gateway?

A

Any VPC connected to TGW automatically becomes available to every other VPC and network. Use route tables to control access

22
Q

How does traffic flow between VPC to TGW?

A

Traffic from VPCs to TGW always flows over AWS private network- including inter-region

23
Q

there are two types of VPC Endpoint available to choose. How do you choose the right one? Gateway Endpoint vs Interface Endpoint

A

Use Gateway Endpoint if the AWS service is either DynamoDB or S3.
Interface Endpoint for everything else