This is a continuation of the previous VPC lab.
Steps:
-
Go to VPC Dashboard and click on Network ACLs tab.
-
Verify current Network ACLs and all inbound and outbound rules.
-
Create New Network ACL
-
Provide a name (e.g. BuddyACL) and select our VPC.
-
Click Create
-
Once created, verify that all inbound and outbound traffic is denied.
-
-
Select our Network ACL and go to Subnet Association tab
-
Click edit
-
Select public Subnet
-
Click save
-
Verify that the subnet count against new Network ACL is 1 and count for default Network ACL reduces to 1 from 2.
-
-
Select our Network ACL and go to inbound rules and add following rules:
-
Rule# = 100, Type = HTTP, Protocol = TCP, Port Range = 80, Source = 0.0.0.0/0, Allow / Deny = Allow.
-
Rule# = 200, Type = HTTPS, Protocol = TCP, Port Range = 443, Source = 0.0.0.0/0, Allow / Deny = Allow.
-
Rule# = 300, Type = SSH, Protocol = TCP, Port Range = 22, Source = 0.0.0.0/0, Allow / Deny = Allow.
-
Rule# = 300, Type = Custom TCP Rule, Protocol = TCP, Port Range = 1024-65535, Source = 0.0.0.0/0, Allow / Deny = Allow.
-
Notes:
-
It is said to be a good practice to start rule# from 100.
-
Custom TCP rule is required for Ephemeral Ports.
-
-
Similarly, go to outbound rules and add same rules.
-
-
Write a rule to block your own IP (or even your mobile’s IP)
-
Add the rule with a number over HTTP allow rule (e.g. 101)
-
Rule# = 101, Type = HTTP, Protocol = TCP, Port Range = 80, Source = <myip>/32, Allow / Deny = Deny.
-
Verify that the Deny rule did not work.
-
-
Add the rule with a number below HTTP allow rule (e.g. 99)
-
Verify that the Deny rule did work.
-
-
TODO:
-
This is the last part of the VPC lab. Hence, cleanup your VPC and related things you crated in this lab to avoid any extra cost. First delete EC2 instances and load balancers and then the VPC.
-
Try creating a VPC through the wizard: VPC Dashboard > Start VPC wizard. Remember to cleanup this as well after trying it out.
Important Notes (Exam Tips)
-
Read about Ephemeral Ports:
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html#VPC_ACLs_Ephemeral_Ports
- heartin's blog
- Log in or register to post comments
Recent comments