From b94ded9923c0d0279e52ff627946e735dea67392 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Fri, 10 Jan 2025 10:57:20 +0000 Subject: [PATCH] Apply Docker workaround for all lxd bridges, including ipv6 --- .github/actions/install-lxd/action.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/actions/install-lxd/action.yaml b/.github/actions/install-lxd/action.yaml index a24800774..12c96019a 100644 --- a/.github/actions/install-lxd/action.yaml +++ b/.github/actions/install-lxd/action.yaml @@ -32,5 +32,16 @@ runs: - name: Apply Docker iptables workaround shell: bash run: | - sudo iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT - sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT + set -x + ip a + ip r + + bridges=('lxdbr0' 'dualstack-br0' 'ipv6-br0') + for i in ${bridges[@]}; do + set +e + sudo iptables -I DOCKER-USER -i $i -j ACCEPT + sudo ip6tables -I DOCKER-USER -i $i -j ACCEPT + sudo iptables -I DOCKER-USER -o $i -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT + sudo ip6tables -I DOCKER-USER -o $i -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT + set -e + done