Internet routing through NAT instance in another VPC (in another organisation)

0

I have a NAT instance that I setup in a VPC in AWS account called "Network". Then I peer this VPC with a Workload VPC in another AWS account within the same Organization. I want Internet-bound traffic from private subnets in the Workload VPC to go through the NAT instance in Network VPC.

Diagram

I have difficulty setting up the route table at Workload VPC to direct 0.0.0.0/0 traffic to the NAT instance. The route table does not accept a raw IP address, yet I cannot specify the NAT instance, nor the ENI because they belong to the Network VPC.

Jeffry
已提问 4 个月前532 查看次数
3 回答
0

**There are few options that you can leverage **

profile pictureAWS
H_Shah
已回答 4 个月前
  • Point 1 will not work without TGW due to how GWLB endpoints work.

0

I believe you will have to use transit gateway if you want this setup to work.

You have a TGW interface on a dedicated subnet in the network account and configure the route table on that subnet to route to the NAT instance.

Then in the workload account set the default route to be the transit gateway.

There will be a little more setup for transit gateway but this is the way to achieve what you’re looking to do.

More info is here https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/centralized-egress-to-internet.html

See Decentralized high availability NAT gateway architecture

profile picture
专家
已回答 4 个月前
profile picture
专家
已审核 4 个月前
  • Updated answer with bullet point to review from Link

0

Hi,

If my understanding is right, your use-case is very similar to an outbound proxy where you would like to do some whitelisting, filtering etc. if this was not the case, I am sure, you would have considered using a workload VPC NAT Gateway instead.

Building out an outbound VPC proxy with domain whitelisting and content filtering has been very well described in this blog below and this comes along with a Cloud formation template. I would suggest you to check this deployment and make any necessary adjustment [e.g. in your case your VPCs are peered]

https://aws.amazon.com/blogs/security/how-to-set-up-an-outbound-vpc-proxy-with-domain-whitelisting-and-content-filtering/

Thanks

profile pictureAWS
Rama
已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则