From 2945d21c9311cf97a5af957c52a11f27773982e0 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 5 Jun 2023 10:24:24 +0200 Subject: [PATCH] Qemu bridge conf test --- scripts/1.qemu.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/1.qemu.sh b/scripts/1.qemu.sh index 7329466..645e318 100755 --- a/scripts/1.qemu.sh +++ b/scripts/1.qemu.sh @@ -39,6 +39,12 @@ setup_network_qemu() { sudo iptables -I FORWARD -o $QEMU_BR_NAME -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT sudo iptables -I FORWARD -j ACCEPT -i $QEMU_BR_NAME fi + if ! test -d /etc/qemu; then + mkdir -p /etc/qemu + fi + if ! grep -q "allow $QEMU_BR_NAME" /etc/qemu/bridge.conf; then + echo "allow $QEMU_BR_NAME" > /etc/qemu/bridge.conf + fi } run_qemu() { id=1