exam questions

Exam ANS-C00 All Questions

View all questions & answers for the ANS-C00 exam

Exam ANS-C00 topic 1 question 26 discussion

Exam question from Amazon's ANS-C00
Question #: 26
Topic #: 1
[All ANS-C00 Questions]

You ping an Amazon Elastic Compute Cloud (EC2) instance from an on-premises server. VPC Flow Logs record the following:
2 123456789010 eni-1235b8ca 10.123.234.78 172.11.22.33 0 0 1 8 672 1432917027
1432917142 ACCEPT OK
2 123456789010 eni-1235b8ca 172.11.22.33 10.123.234.78 0 0 1 4 336 1432917027
1432917082 ACCEPT OK
2 123456789010 eni-1235b8ca 172.11.22.33 10.123.234.78 0 0 1 4 336 1432917094
1432917142 REJECT OK
Why are ICMP responses not received by the on-premises system?

  • A. The inbound network access control list is blocking the traffic
  • B. The outbound network access control list is blocking the traffic
  • C. The inbound security group is blocking the traffic.
  • D. The outbound security group is blocking the traffic.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
An ACCEPT record for the originating ping that was allowed by both the network ACL and the security group, and therefore was allowed to reach your instance.
A REJECT record for the response ping that the network ACL denied.
If your network ACL permits outbound ICMP traffic, the flow log displays two ACCEPT records (one for the originating ping and one for the response ping). If your security group denies inbound ICMP traffic, the flow log displays a single REJECT record, because the traffic was not permitted to reach your instance.
Reference:
https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
exams
Highly Voted 3 years, 8 months ago
Should be B.... Ref: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-records-examples.html If your network ACL permits outbound ICMP traffic, the flow log displays two ACCEPT records (one for the originating ping and one for the response ping). If your security group denies inbound ICMP traffic, the flow log displays a single REJECT record, because the traffic was not permitted to reach your instance.
upvoted 15 times
MD55
3 years, 7 months ago
You mention about "Security Group" and still choose option B? is this typo? .... Option C points at Security Group
upvoted 1 times
MD55
3 years, 7 months ago
Please ignore, now i finally get it .... when Router pings EC2, its allowed bcoz of Security Group inbound allowing the traffic, as it reads the existing session ..... When originator becomes EC2, it blocks due to NACL
upvoted 2 times
...
...
...
valentijn
Highly Voted 3 years, 8 months ago
B is correct. I built a setup in AWS to check. 2 432927501311 eni-03dd2eabc26a7e618 172.31.13.215 10.1.0.219 0 0 1 7 588 1582377988 1582378048 ACCEPT OK 2 432927501311 eni-03dd2eabc26a7e618 10.1.0.219 172.31.13.215 0 0 1 20 1680 1582377988 1582378108 ACCEPT OK 2 432927501311 eni-03dd2eabc26a7e618 172.31.13.215 10.1.0.219 0 0 1 13 1092 1582378071 1582378108 REJECT OK
upvoted 9 times
Ajani
3 years, 8 months ago
Simple, SG is STATEFULL it will allow the return traffic . In this case inbount SG allowed it , so the return traffic automatically allows the reply, but the NACL is STATELESS you need to specify allow rules in both direction in/out. so answer is B
upvoted 2 times
...
Hylasca
3 years, 2 months ago
Your example is not the same as in the question. In the question is 1. A -> B ACCEPT 2. B -> A ACCEPT 3. B -> A REJECT So in your 3rd record, it should show 10.1.0.219 172.31.13.215 not the opposite.
upvoted 2 times
...
sapien45
3 years, 2 months ago
Proof by example, Like that
upvoted 2 times
...
...
PavanKushwah123
Most Recent 2 years, 5 months ago
Correct Answer B
upvoted 1 times
...
PavanKushwah123
2 years, 5 months ago
Correct Answer B
upvoted 1 times
...
d719273
3 years, 6 months ago
Selected Answer: B
Careful with the flow-log fields (packets, bytes, start, end). The only plausible answer is B.
upvoted 2 times
...
Cyril_the_Squirl
3 years, 7 months ago
B is Correct. Remember the difference between the NACL and the SG, notice that ingress traffic is permitted, it’s the return egress traffic that is rejected…Thisnis not only about AWS, it’s about basic networking.
upvoted 1 times
...
Huy
3 years, 7 months ago
With SG and NACL there is 4 log entries. Order is 1. NACL Inbound-> SG (request) 2. SG -> NACL Outbound (response) This case it is B 3 ACCEPTs and 1 REJECT. If Security Group doesn't allow, then the first 1 ACCEPT, 3 REJECTs
upvoted 1 times
Huy
3 years, 7 months ago
I would like clarify. There are 2 ping commands. - 2 first line is successful ping from VPC to on-premise. - 3rd line is a failed ping from on-premise to VPC C is correct answer because if NACL inbound Deny then can't have 2. ICMP (ping) has no port.
upvoted 1 times
walkwolf3
3 years, 7 months ago
Read the question, You ping an Amazon Elastic Compute Cloud (EC2) instance from an on-premises server. Where did you get two ping commands ?
upvoted 2 times
...
...
...
ChauPhan
3 years, 7 months ago
https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-records-examples.html SG is stateful, means if you allow on inbound, outbound is also allowed, so the 2 lines mean that SG is fine and allow ICMP, one ping send, one ping respond. The 3rd line indicates that the NACL outbound is REJECT. (Source IP is EC2, Dest. IP is outside)
upvoted 3 times
...
Nimolee
3 years, 7 months ago
C is Correct. The flow logs are showing two separate ping connections. The first two lines, belong to a successful ping request/response originated from Cloud host to on-prem Server. That confirms that NACL are permitting in both directions because they are stateless. It confirm Sec Group is permitting outbound ICMP from Cloud host. The 3rd line is dropping ping requests from On-Prem to Cloud host therefore no response is generated. Since NACL are not the issue, its the inbound Sec Group on the Cloud host dropping inbound ICMP.
upvoted 3 times
orwell
3 years, 7 months ago
you're right with C. https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-records-examples.html#flow-log-example-security-groups
upvoted 2 times
...
...
examinfo
3 years, 7 months ago
A or D should work. But for ALB, while setup target group, it's a CIDR, not IP
upvoted 1 times
...
kiwili
3 years, 7 months ago
I mean B, the Outbound NACL is blocking.
upvoted 2 times
...
kiwili
3 years, 7 months ago
The answer should D. NACL-In Allowed (4 packets); SG-In allowed (4 packets); SG-Out allowed (4 packets); the NACL-Out Denied (4 packets REJECTs)
upvoted 2 times
...
zgydmy
3 years, 8 months ago
Traffic order is User->in NACL-> in SG -> EC2->out SG -> out NACL. Now ec2 could send a packet to on-premise user(second flow logs action is Accept), so the order before EC2 is allowed. So out SG is allowed(SG is stateful). So the out NACL block the out traffic. So B. OK?
upvoted 2 times
...
Alex_sot
3 years, 8 months ago
Answer is B, we have TWO accepts, so B is correct. Ref: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-records-examples.html If your network ACL permits outbound ICMP traffic, the flow log displays two ACCEPT records (one for the originating ping and one for the response ping). If your security group denies inbound ICMP traffic, the flow log displays a single REJECT record, because the traffic was not permitted to reach your instance.
upvoted 1 times
Alex_sot
3 years, 8 months ago
Correction: Answer is B
upvoted 1 times
jaggi
3 years, 8 months ago
B is correct
upvoted 1 times
...
...
...
BillyC
3 years, 8 months ago
B is correct
upvoted 2 times
...
Hyunseok
3 years, 8 months ago
On the second line, the outbound packet is confirmed normally after the inbound packet. however, the last line only sent outbound packets without inbound packets, so the status information determines whether or not to block them. So I go with D
upvoted 3 times
...
TT2020
3 years, 8 months ago
Maybe D. The 1st trail has 8 packets of 672 bytes. First 336 bytes went thru successfully but the 2nd 336 bytes failed due to outbound SG rule.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...