-
-
Notifications
You must be signed in to change notification settings - Fork 77
Don't require EIP for HA mode #12
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
Conversation
|
This will not work as written. For traffic to come out of |
You don't, routing in Linux is essentially one big table with all input traffic from all sources being dealt with identically.
NAT instances like this will always have an internet connection on
That's what it looked like to me when testing this, but the issue was that the reverse path filter was silently dropping the traffic. I've got a functionally identical version of these changes passing traffic perfectly right now. |
That's what I had thought, but I had been having issues with it. I've implemented this all before, and never remember having to bridge anything...
That'll do it. 🤦♂️ Alright, there's some other components which will need updating for this. I'll test this end to end and add those changes here. |
|
Yeah, getting this working has been almost 5 days of frustration for me, so I'm happy that there's a resolution and something I can contribute.
Go ahead, I don't really mind what happens to these changes as long as they get out there =) |
|
Deployed this in a test stack and it isn't working out of the box. I'll need to do some more digging another day, but if it is working in |
|
Alright, I tried one more thing and it turns out you do need src/dest checks disabled on eth0. I've got a script working that could use some cleanup that I can push up tomorrow. |
|
This has a not-entirely-hack solution to applying this to everything here: https://github.com/int128/terraform-aws-nat-instance/pull/51/files Probably not the best solution, but it works 😅 |
|
Pushed my version of this up to !13. I want to rename some of the config options, but otherwise this is a great improvement overall. Thanks so much! |
|
You're most welcome, I'm closing this pull request now as everything I've done is in your new one. |
This ports most of int128/terraform-aws-nat-instance#52 to
fck-natand builds upon #11.The only requirement for NAT to work is a functional internet connection, so as the NAT EC2 instance is required to be running on a public subnet, we don't actually need a EIP to get a public IP and therefore an internet connection. (Also they're a very limited resource to be required by a "cheap" NAT solution)
Update the scripting to use eth0 for the upstream internet connection instead of deconfiguring it.
This is untested, but is functionally identical to the referenced pull request in the Terraform module which works in my testing. Note that I have not tested port forwarding at all, so it's possible that these changes will break that, however it's unlikely as Linux's routing generally doesn't care where packets come from.
Note that this set of changes will break any system that expects to have an open port on the same IP as it sends from. The fix is to update the port forwarding rules to expect packets on
eth0instead ofeth1.