Scope: the skyworks NixOS configurations for xlab-gateway and skydick,
the live main gateway (door1 / 10.0.0.1) and its separateskynet-server-gateway repository, and the source policy in nix-infra.
[!CAUTION]
DO NOT rebuild, deploy, or otherwise activate a new NixOS generation onskydickuntil the iSCSI persistence problem below is fixed. The current
live LIO target can survive in the kernel while an activation replaces its
saved configuration with{}. A later reboot or target restart can then
remove the target and its client-visible LUN.
skyworks worktree and accepted bynix flake check --offline --all-systems --no-build passed on 2026-07-21 for
both NixOS configurations. The xlab changes below were activated with
deploy-rs, committed as 688ac05, and passed live route, set, lifecycle, and
counter checks.
The source was nix-infra commit8692bebcfaf59be065d84d064c367cb01dddc691 (mesh/proxy: force Alibaba overseas CDN direct for intl-pinned clients). Packet capture had shown about
21,000 packets per affected Taobao/Tmall session going to four AS45102 Alibaba
Singapore ranges which are not in APNIC-CN. Sending them through a foreign
exit caused Alibaba geo/risk controls to see a foreign source. DNS tagging
cannot reliably catch this path because the apps use HTTPDNS/GSLB.
Source references:
nix-infra/hosts/door-pek/networking.nix:630-648 documents the capture and:813-819 places the direct decision before thenix-infra/hosts/door-sha/firewall.nix:218-230 declares the same set;:272-276 applies it in a comment that mentions Alibaba/JD. The commit addsThe migrated policy is:
47.246.0.0/16 43.109.0.0/16 163.181.0.0/16 139.95.0.0/16
5b3cfc5 adds the four ranges todata/infra/nftables.netif. nft -c, live set membership, an unmarkedbr-wan route, and container health were verified.hosts/xlab-gateway/networking.nix:393-402).0x10, and looked up in the mainhosts/xlab-gateway/networking.nix:206-218, :412-427, :7-143,:544-600). The updater strictly validates downloaded fields, retains the.1 path intact if no set is/24 or IPv6 /64 are dropped before the trusted-LAN accepthosts/xlab-gateway/networking.nix:170-175, :197-203).The live xlab service loaded 8,786 IPv4 and 2,039 IPv6 prefixes. Marked CN
route probes selected wan99.0; unmarked foreign probes selectedwg-to-wgnet; all four Alibaba ranges selected the campus WAN. The nft CN
counter increased on client traffic, the source guards were present, and the
host reported no failed units after activation. A deliberate nftables reload
repopulated both sets from the validated cache in under one second; during
that transient empty-set interval, packets safely follow the old .1 path.
These four /16s are the observed Alibaba exception set, not a complete or
future-proof inventory of every JD or Alibaba CDN. Keep packet counters and
capture evidence as the criterion for adding another static exception.
5e1d72f adds daumcdn.net todata/infra/mosdns/force_proxy.txt. EasyPrivacy's tracker_domain.txtNXDOMAIN.PotPlayerSetup64.exe URL were verified.2898736f8f42afd7bfd17ce25ef2047c27b6fd58 adds MosDNS UDP and TCP listeners[fd99:23eb:1682::1]:53. The address and both sockets, IPv6 UDP local andVerified configuration: hosts/skydick/datapool.nix:712-713 only enablesservices.target; it does not set services.target.config. In the pinned
NixOS module, that option defaults to {} and manages/etc/target/saveconfig.json as mode 0600. The documented imperativetargetcli ... saveconfig workflow (hosts/skydick/DATAPOOL.md:516-558)
therefore writes a file that the next NixOS activation can replace with {}.
Impact: an already loaded kernel target can make this look healthy until a
reboot, iscsi-target restart, or LIO clear. The restored target will then be
empty.
Required remediation: first back up the live JSON and record targetcli ls; then make restoration declarative or copy a persistent, encrypted runtime
file into place before iscsi-target starts. Do not put CHAP secrets directly
in a Nix expression because they would enter the world-readable Nix store. Add
an activation assertion that refuses to replace a non-empty live target with
an empty definition, then test restore and client login before allowing a
rebuild.
Verified configuration: /srv is exported to all of 10.0.0.0/16 withcrossmnt (hosts/skydick/datapool.nix:479-480). crossmnt implicitly exports
mounted child filesystems with the parent's options. This can expose unlisted
children such as monitoring, Time Machine, private, or future ZFS datasets and
can undermine narrower child exports.
The surrounding ACLs are also broader than their prose suggests:
/srv/media as UID 900 (:482-485);ye-lw21 and zhuyz24 (:487-500);no_root_squash on backup and VM trees (:502-505).This contradicts "Only you can access your tree" inhosts/skydick/DATAPOOL.md:293-304. Remove crossmnt from the fsid=0
pseudo-root, export every intended child explicitly, and reduce client matches
to exact IPv4 /32 and IPv6 /128 identities. Use SMB or NFS Kerberos
(sec=krb5p) where user authentication is required.
tc state rather thandf99 peers bypass IPv6 policy; several peers appearhosts/xlab-gateway/dhcp.nix:172-178. Treat it as compromised: rotate thehosts/xlab-gateway/networking.nix:178-194). Add/srv tree (hosts/skydick/datapool.nix:298-338), whiledick-zfs-properties exits successfully when pool dick is missing and:340-368). Evaluated NFS and Sambaldap:// with TLS disabled (hosts/skydick/default.nix:326-340); Samba'shosts/skydick/datapool.nix:524-540). Move both to validated StartTLS orhosts/skydick/datapool.nix:715-731, modules/influxdb.nix:33-62,modules/monitoring.nix:166-173, :296-297). Restrict storage protocols tohosts/skydick/README.md:20-42 with per-writer tokens and a/proc/fs/nfsd/portlist containing rdma 20049 twice,hosts/skydick/datapool.nix:441-469; port 20049 is absent from the firewall:715-731, and NFS/RDMA clients require the export's insecure optionproto=rdma from a client mount rather than inferring it from the serverflake.nix:5nixos-25.11; both hosts correctly keep system.stateVersion = "25.11" (hosts/xlab-gateway/default.nix:107,hosts/skydick/default.nix:401). NixOS 25.11 reached EOL after 2026-06-30;system.stateVersion, and specifically rebuild/test the exact-source Sambahosts/skydick/datapool.nix:252-279.balance-xor has no explicit transmit hash policyhosts/xlab-gateway/networking.nix:266-275). Routed traffic can collapsecapwap-df-clear deletes and recreates the wholehosts/xlab-gateway/default.nix:87-104). Move to stableclsact/owned filter handles so restarting the unit cannot erase unrelatedenp130s0 and enp130s0d1hosts/skydick/default.nix:79-100), but ring tuning still targets theenp4s0f0np0 and enp4s0f1np1 (:191-194). Retarget it and recordsamba-wsdd is enabled with openFirewall = falsehosts/skydick/datapool.nix:707-710), while UDP 3702/TCP 5357 are absenthosts/skydick/datapool.nix:404-410). Complete and test PFC,ye-lw21 is a Nix trusted-usermodules/common.nix:7-10) even though the account is documented asmodules/users.nix:23-27). Nix trusted users arehosts/skydick/datapool.nix:371-389,modules/monitoring.nix:88-99) so rotating an agenix secret changes thecrossmnt exposure and narrow NFS client ACLs.df99 bypasses.