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:
parent
30a46a0e15
commit
bf965cfd18
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user