mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Set /proc/sys/net/ipv4/ip_forward on agent start
This commit is contained in:
parent
012bdcb926
commit
cb5e425457
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user