Skip to content

Commit

Permalink
Fix docker iptables workaround
Browse files Browse the repository at this point in the history
* ipv6 may be unavailable, so we'll ignore errors
* log the host ips and routes
  • Loading branch information
petrutlucian94 committed Jan 10, 2025
1 parent 92088b2 commit e2a7d32
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/actions/install-lxd/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@ runs:
- name: Apply Docker iptables workaround
shell: bash
run: |
set -x
ip a
ip r
bridges=('lxdbr0' 'dualstack-br0' 'ipv6-br0')
for i in $bridges
do
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
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

0 comments on commit e2a7d32

Please sign in to comment.