diff --git a/libnetwork/drivers/bridge/setup_ip_forwarding.go b/libnetwork/drivers/bridge/setup_ip_forwarding.go index bf8c50cfff..d6a2d7482d 100644 --- a/libnetwork/drivers/bridge/setup_ip_forwarding.go +++ b/libnetwork/drivers/bridge/setup_ip_forwarding.go @@ -60,6 +60,12 @@ func setupIPForwarding(enableIPTables bool, enableIP6Tables bool) error { if err := iptable.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil { 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