feat: fix nftables boot ordering — start after tailscaled #80
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#80
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?
Lineage
plan-pal-e-platform→ Phase 8 (Network Security Hardening) → Phase 8c (Host Firewall Verification)Repo
forgejo_admin/pal-e-platformUser Story
As a platform operator
I want nftables to load successfully at boot
So that the host firewall is active after every reboot without manual intervention
Context
The nftables config (
/etc/nftables.conf) referencesiif "tailscale0"to accept all Tailscale traffic. nftables validates interface names at load time — if tailscale0 doesn't exist yet,nftfails hard.Currently
nftables.servicestarts atsysinit.target(very early), beforetailscaled.servicecreates thetailscale0interface. Result: nftables service is enabled but failed since March 4. The host has been running withINPUT ACCEPT(no firewall) for 10 days.The fix is a systemd drop-in deployed via Salt that adds
After=tailscaled.service+Wants=tailscaled.serviceto nftables.service. Salt owns all host config — this is not a manual systemd edit.Bug reference:
bug-nftables-service-running-oneshot(status: done — the service.running→service.enabled fix was already applied, but boot ordering was never addressed).File Targets
Files the agent should modify:
salt/states/firewall/init.sls— add systemd drop-in state, daemon-reload state, update requisite chainFiles the agent should NOT touch:
salt/pillar/firewall.sls— rule definitions are correctsalt/states/firewall/nftables.conf.j2— template is correctterraform/— this is Salt, not TerraformAcceptance Criteria
/etc/systemd/system/nftables.service.d/after-tailscale.confwithAfter=tailscaled.serviceandWants=tailscaled.servicecmd.waitforsystemctl daemon-reloadtriggered by drop-in file changesnftables-serviceandnftables-reloadstates requirenftables-daemon-reloadsalt-call state.apply firewallshows 0 failuresnft list rulesetshows rules (not empty)systemctl status nftablesshows success (not failed)Test Expectations
salt-call state.apply firewallsucceeds with 0 failuressystemctl show nftables.service -p Afterincludestailscaled.servicesudo salt-call state.apply firewallConstraints
init.slsChecklist
Closes #NRelated
plan-pal-e-platform— Platform Hardening planphase-pal-e-platform-network-security— Phase 8 parentbug-nftables-service-running-oneshot— original bug (service.running fix)