1
0
mirror of synced 2024-11-24 22:06:07 +03:00

Fix for CentOS 9

- Fixed an issue with nftables on CentOS 9/8, where users may
  encounter the error "unsupported xtables compat expression"
  during VPN setup.
This commit is contained in:
hwdsl2 2024-05-01 20:35:02 -05:00
parent 30a46a0e15
commit bf965cfd18

View File

@ -624,7 +624,11 @@ update_iptables() {
if [ "$use_nft" != 1 ]; then
iptables -A FORWARD -j DROP
fi
if [ "$use_nft" = 1 ]; then
$ipp -s "$XAUTH_NET" -o "$NET_IFACE" ! -d "$XAUTH_NET" -j MASQUERADE
else
$ipp -s "$XAUTH_NET" -o "$NET_IFACE" -m policy --dir out --pol none -j MASQUERADE
fi
$ipp -s "$L2TP_NET" -o "$NET_IFACE" -j MASQUERADE
echo "# Modified by hwdsl2 VPN script" > "$IPT_FILE"
if [ "$use_nft" = 1 ]; then