Private NAT Gateway to Site-to-Site VPN with Restricted CIDR

0

Hi Everyone! I am wondering if the following scenario is possible:

I have an AWS private NAT gateway in a subnet with the CIDR range 172.16.4.0/27. The NAT gateway has a route directed to an AWS VPG and site-to-site VPN. On the site-to-site VPN configuration I have the "Remote IPv4 network CIDR" set to 172.16.4.12/32 as this is the only IP address allowed by the other side of the tunnel.

My question is, will the NAT gateway "know" about the restricted 172.16.4.12/32 CIDR? Meaning all traffic passing through the NAT gateway will be translated ONLY to 172.16.4.12/32 before it enters the tunnel. Or will the NAT gateway continue to use the 172.16.4.0/27 range and only a portion of the traffic, if it happens to be translated to 172.16.4.12/32, will be able to enter the tunnel?

Thank you in advance.

1개 답변
2
수락된 답변

The NAT gateway operates without awareness of the specific CIDR ranges associated with the VPN. By default, it conducts source network address translation using its private IP address (derived from the subnet CIDR range) for traffic originating from private instances and heading towards the internet. In your case, the NAT gateway utilizes its private IP address from the CIDR range 172.16.4.0/27 for source address translation. It does not automatically adjust its translation behavior based on the specific IP addresses allowed in the site-to-site VPN configuration. If the remote side of the site-to-site VPN requires traffic from your VPC to carry a designated source IP address (e.g., 172.16.4.12/32), you may have to manage this translation within your private instances before the traffic reaches the NAT gateway. This could involve configuring your instances to use the specified source IP address in their outbound traffic.

profile picture
전문가
답변함 3달 전
profile picture
전문가
검토됨 2달 전
profile picture
전문가
검토됨 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠