Fix stuck nftables load

Previously, the ssh connection got stuck when first loading the nftables
ruleset. I now found the reason for this: conntrack was not active
before loading the ruleset, so there was no conntrack entry for the ssh
connection. This means the traffic was not matched by 'ct state
established', and the other output rules did not allow the traffic. To
fix this, we can load a ruleset at boot which uses conntrack; this
ensures that conntrack is already enabled when loading the actual
ruleset over ssh.
This commit is contained in:
Jan Schär 2025-03-07 12:41:24 +01:00
parent 0352ad997f
commit 500ca36444
4 changed files with 23 additions and 4 deletions

View file

@ -28,3 +28,6 @@ systemctl disable kexec.service
# Restrict access to the config which contains the WiFi password.
chmod og= /etc/NetworkManager/system-connections/contest.nmconnection
# Enable firewall.
systemctl enable nftables.service