Fix NAT to reference correct interfaces

This moves the NAT commands from terraform to setup.sh

Signed-off-by: Nahum Shalman <nshalman@equinix.com>
This commit is contained in:
Nahum Shalman
2021-04-07 14:11:09 +00:00
parent 5347fe6da7
commit 4d13239d77
3 changed files with 15 additions and 6 deletions

View File

@ -71,12 +71,9 @@ resource "null_resource" "tink_directory" {
destination = "/root/tink"
}
provisioner "remote-exec" {
inline = [
"iptables -A FORWARD -i eth1 -o bond0 -j ACCEPT",
"iptables -A FORWARD -i bond0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT",
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE",
]
provisioner "file" {
source = "nat_interface"
destination = "/root/tink/.nat_interface"
}
provisioner "remote-exec" {

View File

@ -0,0 +1 @@
bond0