[Unit] Description=Strawberry tracker-attribution relay (OpenSnitch events -> daemon) Documentation=https://github.com/trvon/strawberry # Runs in the host network namespace so it can receive OpenSnitch's loopback # connection events; forwards redacted tuples to the sandboxed daemon over its # AF_UNIX ingest socket (docs/tracker-attribution.md). Advisory only. After=strawberry.service opensnitchd.service Wants=opensnitchd.service [Service] Type=simple ExecStart=/usr/local/bin/strawberry opensnitch relay --config /etc/strawberry/strawberry.conf Restart=on-failure RestartSec=10 # Minimal privilege: it only needs to bind the loopback OpenSnitch port (<1024), # read /proc/net/tcp to confirm the peer is root, and connect the daemon's # AF_UNIX ingest socket. It parses untrusted event bytes and drops argv/env # before forwarding, so it keeps no capabilities beyond CAP_NET_BIND_SERVICE. User=root Group=strawberry UMask=0077 CapabilityBoundingSet=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE NoNewPrivileges=true ProtectSystem=strict ProtectHome=true PrivateTmp=true PrivateDevices=true # NOT PrivateNetwork: the relay must share the host namespace with OpenSnitch. ProtectKernelTunables=true ProtectKernelModules=true ProtectKernelLogs=true ProtectControlGroups=true ProtectClock=true ProtectHostname=true # ProtectProc=invisible is fine, but do NOT set ProcSubset=pid: the peer check # reads /proc/net/tcp. ProtectProc=invisible RestrictNamespaces=true RestrictRealtime=true RestrictSUIDSGID=true LockPersonality=true MemoryDenyWriteExecute=true RestrictAddressFamilies=AF_UNIX AF_INET SystemCallArchitectures=native SystemCallFilter=@system-service SystemCallFilter=~@privileged @resources SystemCallErrorNumber=EPERM [Install] WantedBy=multi-user.target