feat: replace nftables flush ruleset with targeted table deletion in gateway entrypoint

Remove global "flush ruleset" command from nftables configuration and add explicit "nft delete table inet nexavpn" before loading rules to avoid clearing unrelated firewall rules while ensuring clean nexavpn table state.
This commit is contained in:
2026-03-18 09:08:26 +01:00
parent a2df8c33d4
commit a5c65deed7

View File

@@ -104,7 +104,6 @@ EOF
cp "${WG_GENERATED}" "${WG_CONF}"
{
echo "flush ruleset"
echo "table inet nexavpn {"
echo " chain forward {"
echo " type filter hook forward priority 0;"
@@ -137,6 +136,7 @@ EOF
sysctl -w net.ipv4.ip_forward=1 >/dev/null || true
fi
nft delete table inet nexavpn >/dev/null 2>&1 || true
nft -f "${NFT_CONF}"
if ip link show "${IFACE}" >/dev/null 2>&1; then