Skip to content
This repository was archived by the owner on Jul 20, 2024. It is now read-only.

Use eth0 for output #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JulianCBC
Copy link

@JulianCBC JulianCBC commented Jul 26, 2022

The only requirement for NAT to work is a functional internet connection, so as the NAT EC2 instance is 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 SNAT scripting to use eth0 for the upstream internet connection instead of deconfiguring it.

I haven't tested DNAT port forwarding with this, but it should still work as it did before once an EIP is connected to the "floating" eth1 interface as Linux's routing shouldn't care.

Upgrading to 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 DNAT rules to use eth0 instead of eth1.

This depends on #51.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
1 participant