mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
default DROP policy on firewall reload also for IPv6
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
This commit is contained in:
parent
ec7df93731
commit
9cf5335269
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,12 @@ func setupIPForwarding(enableIPTables bool, enableIP6Tables bool) error {
|
||||||
if err := iptable.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil {
|
if err := iptable.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil {
|
||||||
logrus.Warnf("Setting the default DROP policy on firewall reload failed, %v", err)
|
logrus.Warnf("Setting the default DROP policy on firewall reload failed, %v", err)
|
||||||
}
|
}
|
||||||
|
iptables.OnReloaded(func() {
|
||||||
|
logrus.Debug("Setting the default DROP policy on firewall reload")
|
||||||
|
if err := iptable.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil {
|
||||||
|
logrus.Warnf("Setting the default DROP policy on firewall reload failed, %v", err)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue