authoravatarclover caruso<git@paperclover.net>2026-10-17 00:18:50-07:00
committeravatarclover caruso<git@paperclover.net>2026-10-21 02:52:29-07:00
log96c5ccc7c2fdad289ee3de6c44e2ba49ca9568c2
treee0f2ed97acc66c5518fcf2793e74f1067f406ba1
parent9e6a14a98ddc7c01cb7ff7713552587970f90edc
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

Limit SMB access to local networks and Tailscale

Replace the physical interface port exception with source-scoped IPv4 LAN, IPv6 link-local, and ULA permits. Preserve Tailscale access and public service ports. Validated the evaluated NixOS start/reload/stop scripts and 13 TCP paths in isolated network namespaces. Assisted-by: gpt-6.1-sol

1 files changed, 6 insertions(+), 1 deletions(-)

nixos/snowglobe.nix+6-1
......@@ -26,7 +26,12 @@ in
2626 networking.firewall.allowedTCPPorts = [ 80 443 ] ++ xmppTCPPorts;
2727 networking.firewall.allowedUDPPorts = xmppUDPPorts;
2828 networking.firewall.allowedUDPPortRanges = [{ from = xmppNetwork.relay_first; to = xmppNetwork.relay_last; }];
29 networking.firewall.interfaces.enp4s0.allowedTCPPorts = [ 445 ];
29 networking.firewall.extraCommands = lib.concatMapStrings ({ address, prefixLength, ... }: ''
30 iptables -A nixos-fw -i enp4s0 -s ${address}/${toString prefixLength} -p tcp --dport 445 -j nixos-fw-accept
31 '') config.networking.interfaces.enp4s0.ipv4.addresses + ''
32 ip6tables -A nixos-fw -i enp4s0 -s fe80::/10 -p tcp --dport 445 -j nixos-fw-accept
33 ip6tables -A nixos-fw -i enp4s0 -s fc00::/7 -p tcp --dport 445 -j nixos-fw-accept
34 '';
3035
3136 systemd.services.xmpp-nat = {
3237 wantedBy = [ "multi-user.target" ];