int128 / terraform-aws-nat-instance

Terraform module to provision a NAT Instance using an Auto Scaling Group and Spot Instance from $1/month
https://registry.terraform.io/modules/int128/nat-instance/aws/
Apache License 2.0
175 stars 90 forks source link

Fix NAT not working 2022-07 #51

Open JulianCBC opened 2 years ago

JulianCBC commented 2 years ago

At some point in the past, reverse path protection was enabled for Amazon Linux 2 AMIs, which causes the host to silently drop all NAT traffic.

My investigation of this issue also uncovered the requirement to disable source/destination checks on the ENIs attached to the NAT box.

This pull request adds patches to brute-force disable reverse path protection and brute-force enable source/destination checks.

This is probably overkill to actually fix the issues, but it works.