Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are the NAT gateways in private subnets...? #53

Open
BrandonALXEllisSS opened this issue Aug 15, 2021 · 1 comment
Open

Why are the NAT gateways in private subnets...? #53

BrandonALXEllisSS opened this issue Aug 15, 2021 · 1 comment
Labels
question Further information is requested

Comments

@BrandonALXEllisSS
Copy link

In the AWS example, the NAT gateways are placed in private subnets, meaning none of the outbound traffic from the NAT gets routed to the IGW.

I thought it's common practice to put the NAT gateway in a public subnet so that it's routed to the IGW automatically...?

Is there something I'm missing?

@malnick malnick added the question Further information is requested label Oct 12, 2021
@malnick
Copy link
Collaborator

malnick commented Oct 12, 2021

Hey @BrandonALXEllisSS - thanks for trying out this project. You can read more about NAT gateway usage here, but in their usage in this example, they're meant to provide outbound connections to the internet. When they're placed in a private subnet, it effectively disallows inbound connections, but egress from the subnet can still take place. In the route tables, we only allow inbound traffic from the public subnet to the IGW and from the public subnet to the private subnet. This way, traffic coming from a public CIDR range can not make inbound requests to the private network, but resources in that private network can still open connections to the public internet using the NAT.

An IGW on the other hand allows bi-lateral networking from the internet, and thats why we route to it from the public subnet.

I am not familiar with the latest and greatest on AWS networking though (NAT gateways are a pretty old, non-redundant construct in AWS), so if you have recommendations for improving this I'm all ears! Thanks again for trying out Boundary.

thierryturpin added a commit to thierryturpin/boundary-reference-architecture that referenced this issue Feb 18, 2022
In order to allow internet outbound from the target instance, the NAT gateways should be in the public subnets.
hashicorp#53
malnick pushed a commit that referenced this issue Apr 6, 2022
In order to allow internet outbound from the target instance, the NAT gateways should be in the public subnets.
#53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants