It’s A. NACL evaluates rule by their number starting from the lowest. It stops evaluating after 100 all traffic allow. Basically 101 is meaningless in any scenario.
You got it right.
Tutorial dojo marked me wrong they picked D (the request will be denied )
I gate Dojo benefit of the doubt and reread AWS docs. But I’m 101% sure A is the answer.
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html
“”"
Network ACL rules
- A network ACL has inbound rules and outbound rules. There are quotas (or limits) to the number of rules you can have per network ACL. Each rule can either allow or deny traffic. Each rule has a number from 1 to 32766. We evaluate the rules in order, starting with the lowest numbered rule, when deciding whether allow or deny traffic. If the traffic matches a rule, the rule is applied and we do not evaluate any additional rules. We recommend that you start by creating rules in increments (for example, increments of 10 or 100) so that you can insert new rules later on, if needed.
- We evaluate the network ACL rules when traffic enters and leaves the subnet, not as it is routed within a subnet.
- NACLs are stateless, which means that information about previously sent or received traffic is not saved. If, for example, you create a NACL rule to allow specific inbound traffic to a subnet, responses to that traffic are not automatically allowed. This is in contrast to how security groups work. Security groups are stateful, which means that information about previously sent or received traffic is saved. If, for example, a security group allows inbound traffic to an EC2 instance, responses are automatically allowed regardless of outbound security group rules.
“”"
If this is a Security Group then the answer would be D because SG is stateful and will evaluate ALL rules. Where NACL is stateless and will evaluate until a rule is matched. Unless there was a trick or word-play that I couldn’t pick out from the question, A would be my answer.
A is correct, you’re on the right track.
NACL rules evaluate from lower to higher order, and as rule nº 100 basically whitelists all traffic, rule 101 is redundant in this scenario.
I saw this exact same question on tutorial dojo last night and it marked my answer of “it is allowed” as correct. Maybe a glitch? Maybe it got reported and changed?
When evaluating traffic against Network ACL (NACL) rules, AWS processes them in numerical order, starting with the lowest rule number. In this scenario, Rule 100 allows ALL traffic from any source IP (0.0.0.0/0), which means that the incoming request from the IP address 110.238.109.37 will match Rule 100 and be allowed immediately. Since Rule 100 is evaluated first and allows all traffic, Rule 101 (which denies traffic from 110.238.109.37 on TCP port 4000) will not be reached or evaluated. The request will be allowed without delay because the first matching rule permits it.
Therefore, the correct answer is Option A: It will be allowed. The traffic will be allowed immediately by Rule 100, and Rule 101 will not even be considered. This demonstrates the importance of rule order in NACLs. Once a matching rule is found, AWS does not continue to evaluate subsequent rules.
We will update this item and clarify the explanation immediately to ensure everything is accurate.
D
It will be denied
Although the first ALL traffic rule on ACL matches, the provided incoming IP is a public IP, but the instance is in private subnet and so it won’t have a public IP assigned by default to be accessible from outside the VPC
It does not talk about Nat gateway, the keyword is private subnet. Without a NAT and Internet gateway it can not be accessed from outside.
Tutorial dojo marked me wrong according to them the correct answer is D which I highly doubt.Thank for confirming
The NACL evaluates from lowest rule to highest so rule 100 would be evaluated first and if a match is found it will allow the packet it will not evaluate any further
The question is focused on NACL and how they evaluate packets
Your comment makes sense, but NAT and IGW are not applicable here, they are for outbound requests.
It does seem like a trick question.
That IP address is part of the public IP address range. Your subnet is private. A computer with that IP address will not be able to reach the subnet.
I would have gotten it wrong too - the cert exams do not trick questions like this. But tutorialdojo’s exams do.
I faced this question yesterday and I was in the same boat. I thought about sending an email to the support for clarification and testing on lab environment but I lacked time.
Since NACL evaluation is in numbering order so rule 100 would be evaluated first it will not even get to rule 101 since a match was found at 100
Yes I agree, Tutorial Dojo even said in the first half of their explanation that lower number is evaluated first so I was lost when in the second half they said rule 101 match first so rule 100 is not evaluated.
A. When the first NACL (lowest number) is an allow all, subsequent rules don’t matter. So, all incoming connections will be accepted.
However, NACLs are stateless. If a matching outbound rule is not present, the initial incoming connection may be accepted but the overall connection may fail. It all depends on interpretation of “connection”.
Private Subnet, thus the NACL doesn’t matter.