container-test-run-user-firewall-iptables
checks.aarch64-linux.nixos-test-user-firewall-iptables
· build #855
· raw
1build01: building c76jf74b5nmj41gsv75rrxavls0gvb4m-container-test-run-user-firewall-iptables.drv2additionally exposed symbols:3 machine, router,4 start_all, machines, driver, Machine, wait_for_signal5Starting machine6Starting router78910<<< NixOS Stage 2 >>>1112booting system configuration /nix/store/ckydrc9h16si6imwayzqhgdg7bl7qms1-nixos-system-machine-test13running activation script...14setting up /etc...152: host0@if3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 100016 link/ether 0e:74:26:22:81:c2 brd ff:ff:ff:ff:ff:ff link-netnsid 017starting systemd...18systemd 260.4 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -BTF -XKBCOMMON +UTMP +LIBARCHIVE)19Detected virtualization systemd-nspawn.20Detected architecture arm64.21Detected first boot.22Initializing machine ID from container UUID.23Applying preset policy.24Populated /etc with preset unit settings.25Queued start job for default target Multi-User System.26272829<<< Welcome to NixOS test (aarch64) - console >>>30+ systemd-run /bin/sh -c '/nix/store/fl0k50cdb33a5xxzlzmz5782yw66rj4r-coreutils-9.11/bin/sleep 999999999 && echo 024b416b-cb8e-4874-b87e-67a7102d44f2'31Running as unit: run-p344-i32351880.service; invocation ID: ec24d0e42c3f42b68dcffb12d182249d32To attach to container machine run on the same machine that runs the test:33 sudo nsenter --user --target $(\pgrep -f '^/bin/sh.*024b416b-cb8e-4874-b87e-67a7102d44f2') --mount --uts --ipc --net --pid --cgroup /bin/sh -c bash 3435To inject external network and continue test, run:36sudo /nix/store/76jq0mngg7m8zv5yjz1qgg0xspzi8x2w-python3-3.13.15/bin/python3.13 /nix/store/wnw0bdidpxrmh9sam4hz6d39w1x6ywiv-test-driver-0.0.1/lib/python3.13/site-packages/test_driver/inject_network.py 024b416b-cb8e-4874-b87e-67a7102d44f23738<<< NixOS Stage 2 >>>3940booting system configuration /nix/store/rz0rf028s2qbdhaf21w6lcpmf5si6z6a-nixos-system-router-test41running activation script...42setting up /etc...432: host0@if4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 100044 link/ether a6:24:31:fe:b9:6d brd ff:ff:ff:ff:ff:ff link-netnsid 045starting systemd...46systemd 260.4 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -BTF -XKBCOMMON +UTMP +LIBARCHIVE)47Detected virtualization systemd-nspawn.48Detected architecture arm64.49Detected first boot.50Initializing machine ID from container UUID.51Applying preset policy.52Populated /etc with preset unit settings.53Queued start job for default target Multi-User System.54555657<<< Welcome to NixOS test (aarch64) - console >>>58+ systemd-run /bin/sh -c '/nix/store/fl0k50cdb33a5xxzlzmz5782yw66rj4r-coreutils-9.11/bin/sleep 999999999 && echo 1a78bba4-bca5-42cc-b196-4e54767e89b9'59Running as unit: run-p209-i32351883.service; invocation ID: dbeb7e999aa84ec2b46196c220d81deb60To attach to container router run on the same machine that runs the test:61 sudo nsenter --user --target $(\pgrep -f '^/bin/sh.*1a78bba4-bca5-42cc-b196-4e54767e89b9') --mount --uts --ipc --net --pid --cgroup /bin/sh -c bash 6263To inject external network and continue test, run:64sudo /nix/store/76jq0mngg7m8zv5yjz1qgg0xspzi8x2w-python3-3.13.15/bin/python3.13 /nix/store/wnw0bdidpxrmh9sam4hz6d39w1x6ywiv-test-driver-0.0.1/lib/python3.13/site-packages/test_driver/inject_network.py 1a78bba4-bca5-42cc-b196-4e54767e89b965+ systemctl --no-pager show multi-user.target66+ systemctl --no-pager show nginx.service67+ systemctl --no-pager show multi-user.target68+ systemctl --no-pager show nginx.service69+ ip -4 addr show eth170+ grep -oP '(?<=inet\s)\d+(\.\d+){3}'71+ ip -6 addr show eth172+ grep -v '^fe80'73+ grep -oP '(?<=inet6\s)[0-9a-f:]+'74+ head -175Router IPv4: 192.168.1.276Router IPv6: 2001:db8:1::277+ systemctl restart firewall78+ systemctl --no-pager show firewall.service79+ iptables -L user-firewall-output80Chain user-firewall-output (1 references)81target prot opt source destination 82RETURN all -- anywhere anywhere 83RETURN all -- anywhere anywhere 84RETURN all -- anywhere anywhere 85RETURN all -- anywhere anywhere 86RETURN all -- anywhere anywhere 87RETURN all -- anywhere anywhere 88RETURN all -- anywhere anywhere 89RETURN all -- anywhere anywhere 90RETURN all -- anywhere anywhere 91RETURN all -- anywhere anywhere 92RETURN all -- anywhere anywhere 93RETURN all -- anywhere anywhere 94RETURN all -- anywhere anywhere 95RETURN all -- anywhere anywhere 96RETURN all -- anywhere anywhere 97REJECT all -- anywhere anywhere owner UID match bob reject-with icmp-port-unreachable98RETURN all -- anywhere anywhere 99machine: waiting for success: runuser -u alice -- curl -s http://127.0.0.1:8080100+ runuser -u alice -- curl -s http://127.0.0.1:8080101(finished: waiting for success: runuser -u alice -- curl -s http://127.0.0.1:8080, in 0.02 seconds)102+ runuser -u alice -- curl -s http://192.168.1.2103+ runuser -u alice -- curl -s 'http://[2001:db8:1::2]'104+ runuser -u bob -- curl -s http://127.0.0.1:8080105+ runuser -u bob -- curl -s --connect-timeout 2 http://192.168.1.2106+ echo EXIT_CODE=7107+ runuser -u bob -- curl -s --connect-timeout 2 'http://[2001:db8:1::2]'108+ echo EXIT_CODE=7109+ iptables -L user-firewall-output -n -v110+ ip6tables -L user-firewall-output -n -v111+ systemctl --no-pager show setup-wg0-interface.service112+ systemctl --no-pager show nginx.service113machine: waiting for success: nc -z 10.100.0.2 8081114+ nc -z 10.100.0.2 8081115Connection to 10.100.0.2 8081 port [tcp/sunproxyadmin] succeeded!116(finished: waiting for success: nc -z 10.100.0.2 8081, in 0.01 seconds)117+ ip link show wg0118+ ip addr show wg0119+ runuser -u alice -- curl -s --interface wg0 http://10.100.0.2:8081/120+ runuser -u alice -- curl -s --interface wg0 'http://[fd00::2]:8081/'121+ runuser -u bob -- curl -s --interface wg0 http://10.100.0.2:8081/122+ runuser -u bob -- curl -s --interface wg0 'http://[fd00::2]:8081/'123+ iptables -L user-firewall-output -n -v124+ grep -E 'wg0|wg\+'125 0 0 RETURN all -- * wg+ 0.0.0.0/0 0.0.0.0/0 126127