From c3fdee766ff69bb90ca1c43b05731ea16f5c9056 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 30 Sep 2014 15:24:30 +0100 Subject: [PATCH] Add iptables rule to forward traffic across the bridge, to avoid ufw blocking it --- weaver/weave | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weaver/weave b/weaver/weave index 4f2e6d6d..a44f2883 100755 --- a/weaver/weave +++ b/weaver/weave @@ -60,6 +60,9 @@ create_bridge() { ip link del dev v${CONTAINER_IFNAME}du # disable offloading check_command_and_run ethtool ethtool -K $BRIDGE tx off >/dev/null + # Work round the situation where there are no rules allowing traffic + # across our bridge. E.g. ufw + add_iptables_rule filter FORWARD -i weave -o weave -j ACCEPT } ip link set dev $BRIDGE up } @@ -68,6 +71,7 @@ destroy_bridge() { if [ -d /sys/class/net/$BRIDGE ] ; then ip link del dev $BRIDGE fi + iptables -t filter -D FORWARD -i weave -o weave -j ACCEPT 2>/dev/null || true } run_iptables() {