container-test-run-user-firewall-nftables
checks.aarch64-linux.nixos-test-user-firewall-nftables
· build #904
· raw
1build01: building as6mcg9j3d88cy292j7ilphawbjs3qgd-container-test-run-user-firewall-nftables.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/375avz5wqs8g8wnfycjhdcwyvjr0ghza-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.5 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/3l7ygqcc6v0rbi9d4j1m6phi6sz86j98-coreutils-9.11/bin/sleep 999999999 && echo 6c5a0890-ac53-43ef-ae77-b37d23f67574'31Running as unit: run-p225-i35939177.service; invocation ID: 895952c545a64de490d7ad887a40431732To attach to container machine run on the same machine that runs the test:33 sudo nsenter --user --target $(\pgrep -f '^/bin/sh.*6c5a0890-ac53-43ef-ae77-b37d23f67574') --mount --uts --ipc --net --pid --cgroup /bin/sh -c bash 3435To inject external network and continue test, run:36sudo /nix/store/q1khrhbn506imjxx7kiqcbihycawa6kl-python3-3.13.15/bin/python3.13 /nix/store/gvgmxwdx1p2q00qm4j8278f9yv9m1f6h-test-driver-0.0.1/lib/python3.13/site-packages/test_driver/inject_network.py 6c5a0890-ac53-43ef-ae77-b37d23f675743738<<< NixOS Stage 2 >>>3940booting system configuration /nix/store/7qbbsd5nff93pq95877ksk21wcvmal2p-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.5 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/3l7ygqcc6v0rbi9d4j1m6phi6sz86j98-coreutils-9.11/bin/sleep 999999999 && echo 57616972-36c5-4f23-95e6-aecf98e6bd99'59Running as unit: run-p209-i35939180.service; invocation ID: 2bcc4ba8f040475099d11136ce89654e60To attach to container router run on the same machine that runs the test:61 sudo nsenter --user --target $(\pgrep -f '^/bin/sh.*57616972-36c5-4f23-95e6-aecf98e6bd99') --mount --uts --ipc --net --pid --cgroup /bin/sh -c bash 6263To inject external network and continue test, run:64sudo /nix/store/q1khrhbn506imjxx7kiqcbihycawa6kl-python3-3.13.15/bin/python3.13 /nix/store/gvgmxwdx1p2q00qm4j8278f9yv9m1f6h-test-driver-0.0.1/lib/python3.13/site-packages/test_driver/inject_network.py 57616972-36c5-4f23-95e6-aecf98e6bd9965+ 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 -oP '(?<=inet6\s)[0-9a-f:]+'73+ grep -v '^fe80'74+ head -175Router IPv4: 192.168.1.276Router IPv6: 2001:db8:1::277+ systemctl restart nftables78+ systemctl --no-pager show nftables.service79+ nft list table inet user-firewall80table inet user-firewall {81 chain output {82 type filter hook output priority filter; policy accept;83 oifname "lo" counter packets 0 bytes 0 accept comment "allow lo"84 oifname "tun*" counter packets 0 bytes 0 accept comment "allow tun*"85 oifname "tap*" counter packets 0 bytes 0 accept comment "allow tap*"86 oifname "wg*" counter packets 0 bytes 0 accept comment "allow wg*"87 oifname "tailscale*" counter packets 0 bytes 0 accept comment "allow tailscale*"88 oifname "zt*" counter packets 0 bytes 0 accept comment "allow zt*"89 oifname "vpn*" counter packets 0 bytes 0 accept comment "allow vpn*"90 oifname "ipsec*" counter packets 0 bytes 0 accept comment "allow ipsec*"91 oifname "nebula*" counter packets 0 bytes 0 accept comment "allow nebula*"92 oifname "tinc*" counter packets 0 bytes 0 accept comment "allow tinc*"93 oifname "edge*" counter packets 0 bytes 0 accept comment "allow edge*"94 oifname "hyprspace" counter packets 0 bytes 0 accept comment "allow hyprspace"95 oifname "ham0" counter packets 0 bytes 0 accept comment "allow ham0"96 oifname "easytier" counter packets 0 bytes 0 accept comment "allow easytier"97 oifname "mycelium" counter packets 0 bytes 0 accept comment "allow mycelium"98 meta skuid 1002 counter packets 0 bytes 0 reject comment "blocked user bob"99 }100}101machine: waiting for success: runuser -u alice -- curl -s http://127.0.0.1:8080102+ runuser -u alice -- curl -s http://127.0.0.1:8080103(finished: waiting for success: runuser -u alice -- curl -s http://127.0.0.1:8080, in 0.02 seconds)104+ runuser -u alice -- curl -s http://192.168.1.2105+ runuser -u alice -- curl -s 'http://[2001:db8:1::2]'106+ runuser -u bob -- curl -s http://127.0.0.1:8080107+ runuser -u bob -- curl -s --connect-timeout 2 http://192.168.1.2108+ echo EXIT_CODE=7109+ runuser -u bob -- curl -s --connect-timeout 2 'http://[2001:db8:1::2]'110+ echo EXIT_CODE=7111+ nft list table inet user-firewall112+ systemctl --no-pager show setup-wg0-interface.service113+ systemctl --no-pager show nginx.service114machine: waiting for success: nc -z 10.100.0.2 8081115+ nc -z 10.100.0.2 8081116Connection to 10.100.0.2 8081 port [tcp/sunproxyadmin] succeeded!117(finished: waiting for success: nc -z 10.100.0.2 8081, in 0.01 seconds)118+ ip link show wg0119+ ip addr show wg0120+ runuser -u alice -- curl -s --interface wg0 http://10.100.0.2:8081/121+ runuser -u alice -- curl -s --interface wg0 'http://[fd00::2]:8081/'122+ runuser -u bob -- curl -s --interface wg0 http://10.100.0.2:8081/123+ runuser -u bob -- curl -s --interface wg0 'http://[fd00::2]:8081/'124+ nft list table inet user-firewall125+ grep -E 'oifname.*wg'126 oifname "wg*" counter packets 1 bytes 56 accept comment "allow wg*"127128