nftables reload-after-tailscale systemd fix #181
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform#181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
standalone — discovered during Mac agent setup (#174)
Repo
forgejo_admin/pal-e-platformWhat Broke
nftables resolves interface names (e.g.
iif "tailscale0") to numeric ifindex at load time. If Tailscale restarts and gets a new interface index, the firewall rule silently stops matching — Tailscale traffic gets dropped by the default policy. Discovered when Mac Salt minion couldn't reach the master.Repro Steps
sudo nft list ruleset | grep iif— showsiif 5(stale numeric index) instead ofiif "tailscale0"Expected Behavior
After reboot, nftables rules should reference the current Tailscale interface, not a stale index. Firewall should reload automatically after Tailscale starts.
Environment
salt/states/firewall/)tailscale0(index varies across restarts)Acceptance Criteria
nft list ruleset | grep iifshowsiif "tailscale0"(not a number)Notes
Related
feedback_ci_pipeline_lessons— similar nftables boot ordering issue fixed before (PR #81)Scope Review: NEEDS_REFINEMENT
Review note:
review-400-2026-03-27Critical finding: The codebase already has a partial fix.
salt/states/firewall/init.sls(lines 31-45) creates a systemd drop-in withAfter=tailscaled.service+Wants=tailscaled.service, ensuring nftables loads after tailscaled at boot. Acceptance criterion #3 ("Salt state manages the systemd drop-in") is already done.Issues to resolve before moving to next_up:
systemctl restart tailscaled(not fixed byAfter=)? TheAfter=directive only controls startup ordering -- it does NOT trigger nftables reload when tailscaled restarts.systemctl restart tailscaled,nft list ruleset | grep iifstill showstailscale0."PartOf=tailscaled.serviceto the existing drop-in (causes nftables to restart when tailscaled restarts).nft list ruleset | grep iifto confirm whether criterion 1 already passes with existing code.Issue body updated per scope review corrections.