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
gefragt vor 4 Monaten532 Aufrufe
3 Antworten
0

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

profile pictureAWS
H_Shah
beantwortet vor 4 Monaten
  • 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
EXPERTE
beantwortet vor 4 Monaten
profile picture
EXPERTE
überprüft vor 4 Monaten
  • 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
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen