Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 (?) , you can switch to a simple comment.
Switch to a voting comment New
vsk12
Highly Voted 1 year, 10 months ago
I would go with option B. Source will be public IP like 198.51.100.2.
upvoted 21 times
...
kiran15789
Highly Voted 1 year, 8 months 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 18 times
sashenka
2 weeks 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
2 weeks ago
It has to be D as it only includes unsolicited traffic. Option B includes both.
upvoted 1 times
...
zejou1
1 year, 8 months ago
For those that are choosing D - this is why D is incorrect and needs to be B
upvoted 2 times
...
...
youonebe
Most Recent 6 days, 16 hours 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 1 times
...
tural_nasirov
1 week 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
2 weeks 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
2 weeks 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
3 weeks ago
D, we need to see if the internal origin was first used
upvoted 2 times
...
NirvanaSNM
4 months, 1 week 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
4 months, 3 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
5 months, 1 week 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
5 months, 3 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
7 months, 3 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
8 months, 1 week ago
Selected Answer: B
B, CloudWatch & destination address 203.0
upvoted 2 times
...
ajeeshb
8 months, 2 weeks 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
9 months, 2 weeks 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
...
master9
10 months ago
Selected Answer: D
Action = ACCEPT for inbound traffic that comes from public IP address 198.51.100.2 --> Destination
upvoted 3 times
...
cox1960
10 months, 1 week ago
B is what "the company is seeing", so D to see if it was first initiated from EC2.
upvoted 4 times
...
bjexamprep
11 months, 4 weeks ago
I would say this question is wrong, even we ignore the 203.0 is a public IP. Both B and D can do the job. With B: if the return value is bigger than 0, that means the traffic was initiated from internal so that NAT GW wouldn't drop that traffic. While, if the return is 0, that means the traffic was dropped by NAT after ACCEPTed, which means it was not initiated from internal. With D: if the return value is bigger than 0, obviously the traffic was initiated from internal. If the return value is 0, that means the traffic was initiated from internet.
upvoted 2 times
ninomfr64
10 months, 1 week ago
You need first to query traffic from public IP to private IP, check if the NAT Gateway is the only private IP. If not then you query traffic (from private IP to public IP) OR (from public IP to private IP) and this will show bi-directional traffic allowing you to determine whether the private instance or external public IP address is the initiator. Thus B and not D
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 ...