From cb5e4254572805c3e70a342ce3ad84124ea438fe Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Sat, 23 Feb 2019 22:38:24 -0700 Subject: [PATCH] Set /proc/sys/net/ipv4/ip_forward on agent start --- pkg/agent/syssetup/setup.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/agent/syssetup/setup.go b/pkg/agent/syssetup/setup.go index 1bc3c9ece3..7f32479034 100644 --- a/pkg/agent/syssetup/setup.go +++ b/pkg/agent/syssetup/setup.go @@ -9,6 +9,7 @@ import ( var ( callIPTablesFile = "/proc/sys/net/bridge/bridge-nf-call-iptables" + forward = "/proc/sys/net/ipv4/ip_forward" ) func Configure() error { @@ -16,5 +17,8 @@ func Configure() error { if err := ioutil.WriteFile(callIPTablesFile, []byte("1"), 0640); err != nil { logrus.Warnf("failed to write value 1 at %s: %v", callIPTablesFile, err) } + if err := ioutil.WriteFile(forward, []byte("1"), 0640); err != nil { + logrus.Warnf("failed to write value 1 at %s: %v", forward, err) + } return nil }