exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 90 discussion

A company has VPC flow logs enabled for Its NAT gateway. The company is seeing Action = ACCEPT for inbound traffic that comes from public IP address 198.51.100.2 destined for a private Amazon EC2 instance.

A solutions architect must determine whether the traffic represents unsolicited inbound connections from the internet. The first two octets of the VPC CIDR block are 203.0.

Which set of steps should the solutions architect take to meet these requirements?

  • A. Open the AWS CloudTrail console. Select the log group that contains the NAT gateway's elastic network interface and the private instance's elastic network interlace. Run a query to filter with the destination address set as "like 203.0" and the source address set as "like 198.51.100.2". Run the stats command to filter the sum of bytes transferred by the source address and the destination address.
  • B. Open the Amazon CloudWatch console. Select the log group that contains the NAT gateway's elastic network interface and the private instance's elastic network interface. Run a query to filter with the destination address set as "like 203.0" and the source address set as "like 198.51.100.2". Run the stats command to filter the sum of bytes transferred by the source address and the destination address.
  • C. Open the AWS CloudTrail console. Select the log group that contains the NAT gateway's elastic network interface and the private instance’s elastic network interface. Run a query to filter with the destination address set as "like 198.51.100.2" and the source address set as "like 203.0". Run the stats command to filter the sum of bytes transferred by the source address and the destination address.
  • D. Open the Amazon CloudWatch console. Select the log group that contains the NAT gateway's elastic network interface and the private instance's elastic network interface. Run a query to filter with the destination address set as "like 198.51.100.2" and the source address set as "like 203.0". Run the stats command to filter the sum of bytes transferred by the source address and the destination address.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
vsk12
Highly Voted 2 years, 1 month ago
I would go with option B. Source will be public IP like 198.51.100.2.
upvoted 22 times
...
kiran15789
Highly Voted 2 years ago
Selected Answer: B
https://aws.amazon.com/premiumsupport/knowledge-center/vpc-analyze-inbound-traffic-nat-gateway/ Refer Reason 1 Run the query below. filter (dstAddr like 'xxx.xxx' and srcAddr like 'public IP') | stats sum(bytes) as bytesTransferred by srcAddr, dstAddr | limit 10 Note: You can use just the first two octets in the search filter to analyze all network interfaces in the VPC. In the example above, replace xxx.xxx with the first two octets of your VPC classless inter-domain routing (CIDR). Also, replace public IP with the public IP that you're seeing in the VPC flow log entry. Query results show traffic on the NAT gateway private IP from the public IP, but not traffic on other private IPs in the VPC. These results confirm that the incoming traffic was unsolicited. However, if you do see traffic on the private instance's IP, then follow the steps under Reason #2.
upvoted 19 times
sashenka
4 months, 1 week ago
To determine whether the traffic represents unsolicited inbound connections from the internet, use the Amazon CloudWatch console. Select the log group that contains the NAT gateway’s elastic network interface and the private instance’s elastic network interface. Run a query to filter with the destination address set as “like 203.0” and the source address set as “like 198.51.100.2”. This approach helps you analyze the VPC flow logs to identify if the inbound traffic to the private EC2 instance is expected return traffic or unsolicited. The stats command can be used to filter the sum of bytes transferred by the source address and the destination address, providing insight into the traffic patterns and ensuring network security.
upvoted 1 times
...
sashenka
4 months, 1 week ago
It has to be D as it only includes unsolicited traffic. Option B includes both.
upvoted 1 times
...
zejou1
2 years ago
For those that are choosing D - this is why D is incorrect and needs to be B
upvoted 2 times
...
...
BennyMao
Most Recent 1 week, 2 days ago
Selected Answer: D
The NAT gateway allows outbound internet traffic from private instances but does not accept unsolicited inbound connections. If 198.51.100.2 is contacting the private instance, we need to determine if this is a response to an existing outbound request from the private instance.
upvoted 1 times
...
BennyMao
1 week, 2 days ago
Selected Answer: D
The NAT gateway allows outbound internet traffic from private instances but does not accept unsolicited inbound connections. If 198.51.100.2 is contacting the private instance, we need to determine if this is a response to an existing outbound request from the private instance.
upvoted 1 times
...
grumpysloth
3 months ago
Selected Answer: D
we need to check if the request starts from ec2 instances outbound, not the other way round.
upvoted 1 times
...
youonebe
4 months ago
Correct answer is D. This is for NAT traffic analysis, so the focus is outbound. VPC Flow Logs are published to CloudWatch Logs, not CloudTrail1. This immediately eliminates options A and C. To determine if the traffic is unsolicited inbound connections: We need to check if the private EC2 instance (starting with 203.0) initiated the connection to 198.51.100.2 If the source IP is from the VPC (203.0) and the destination is 198.51.100.2, this indicates the connection was initiated from inside the VPC This would mean the ACCEPT traffic is a response to an outbound request, not unsolicited inbound traffic.
upvoted 2 times
...
tural_nasirov
4 months ago
Selected Answer: B
The answer is B. This is not about an IP but about a port. If the packet from outside to inside has the source port which is well known and the destination port dynamic, it means that the connection was initiated from inside, if the packet from outside to inside has a source port dynamic and destination port well known, it means that the traffic was originated from outside :)
upvoted 1 times
...
sashenka
4 months, 1 week ago
Selected Answer: D
Why Option B is Problematic: // Example CloudWatch Logs Insights Query for Option B fields @timestamp, sourceAddress, destinationAddress, action, bytes | filter destinationAddress like "203.0" | filter sourceAddress like "198.51.100.2" | stats sum(bytes) by sourceAddress, destinationAddress 1. Incorrect Traffic Direction - It looks for traffic where source = 198.51.100.2 (internet) and destination = 203.0.x.x (VPC) This only shows successful inbound connections (ACCEPT) It doesn't reveal whether these connections were solicited or unsolicited 2. Missing Context - Doesn't show the initial outbound connection that would indicate a solicited response - Cannot differentiate between legitimate responses and actual unsolicited connections - Lacks the temporal relationship between outbound and inbound flows
upvoted 2 times
sashenka
4 months, 1 week ago
Better Approach (Option D) sql // Example CloudWatch Logs Insights Query for Option D fields @timestamp, sourceAddress, destinationAddress, action, bytes | filter sourceAddress like "203.0" | filter destinationAddress like "198.51.100.2" | stats sum(bytes) by sourceAddress, destinationAddress This query would: Show outbound traffic from VPC to the internet Help establish if the private instance initiated communication Allow correlation between outbound requests and inbound responses Key Concept With NAT gateway connections: Legitimate traffic follows a request-response pattern Outbound request must exist before inbound response Looking only at inbound traffic (Option B) misses this crucial relationship Therefore, Option D provides the necessary visibility to determine if the inbound connections were truly unsolicited by examining the outbound traffic first.
upvoted 1 times
...
...
sammyhaj
4 months, 2 weeks ago
D, we need to see if the internal origin was first used
upvoted 2 times
...
NirvanaSNM
8 months ago
Selected Answer: B
destination address set as "like 203.0" and the source address set as "like 198.51.100.2"
upvoted 1 times
...
mns0173
8 months, 2 weeks ago
Of course it is D. What useful info will you get from B? You need to check original request which in case of NAT is always EC2, not something in the internet.
upvoted 1 times
...
Helpnosense
9 months ago
Selected Answer: B
I vote B. Because the network traffic to check is unsolicited inbound connection. IT is initiated from the internet to internal EC2. The source is public IP address and the target is internal IP.
upvoted 1 times
...
higashikumi
9 months, 2 weeks ago
Selected Answer: B
To determine whether the traffic represents unsolicited inbound connections from the internet, use the Amazon CloudWatch console. Select the log group that contains the NAT gateway’s elastic network interface and the private instance’s elastic network interface. Run a query to filter with the destination address set as “like 203.0” and the source address set as “like 198.51.100.2”. This approach helps you analyze the VPC flow logs to identify if the inbound traffic to the private EC2 instance is expected return traffic or unsolicited. The stats command can be used to filter the sum of bytes transferred by the source address and the destination address, providing insight into the traffic patterns and ensuring network security.
upvoted 1 times
...
Vongolatt
11 months, 2 weeks ago
Selected Answer: D
the solution architect want to check if it's unsolicited traffic or not, so we need to check the if the request is sent by us. which means 198.51.100.2 should be the destination.
upvoted 2 times
...
gofavad926
1 year ago
Selected Answer: B
B, CloudWatch & destination address 203.0
upvoted 2 times
...
ajeeshb
1 year ago
Selected Answer: D
The question is "Solutions architect must determine whether the traffic represents unsolicited inbound connections from the internet". The NAT gateway does not allow any inbound traffic from an internet other than response to a traffic it sent out to internet which came from a VPC resource (eg, EC2). So to find out if the inbound traffic to NAT Gateway from internet IP 198.51.100.2 is unsolicit or not, check the vpc flowlog to see if there was an original request from source IP 203.0 to destination 198.51.100.2. This is what option D says.
upvoted 3 times
...
8608f25
1 year, 1 month ago
Selected Answer: B
Option B is correct because VPC flow logs are stored in Amazon CloudWatch Logs. Analyzing these logs in CloudWatch allows you to filter and examine specific traffic patterns, such as traffic coming from a public IP address to a private instance. The query specified in this option correctly aims to identify traffic from the public IP (198.51.100.2) to the private IP range of the VPC (beginning with 203.0), which aligns with the requirement to investigate unsolicited inbound connections.
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago