I am attempting to configure a tricky sort of traffic handling node. I'd like to have a node receive traffic over a VPN connection on one NIC, then NAT them out to the internet over a second NIC. I'm starting from the script installed on AWS NAT Instances. The basics of it are below:
sysctl -q -w net.ipv4.ip_forward=1
net.ipv4.conf.eth1.send_redirects=0
iptables -t nat -C POSTROUTING -o eth1 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
I'm a bit clueless as to how I should go about allowing both NICs to reach the internet independently, and how to properly configure eth0 to forward outbound VPN traffic to the internet. Can anyone point me in the right direction?