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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user