iptables-legacy support

This commit is contained in:
gSpot
2022-05-15 20:39:58 +03:00
parent b1c0482c9d
commit cb51ed34a3
@@ -1,6 +1,14 @@
IP_CMD="ip"
IPT_CMD="iptables"
IPT_CMD=`which iptables-legacy`
if [ $? -ne 0 ]; then
IPT_CMD=`which iptables`
if [ $? -ne 0 ]; then
echo " Error! Iptables doesn't exists" >&2
exit 1
fi
fi
IPT_ALLOWED_HOSTS_CHAIN="${NAME}_allowed_hosts"
IPT_BLLIST_CHAIN="${NAME}_blacklist"
IPT_ACTION_CHAIN="${NAME}_action"
@@ -99,8 +107,6 @@ IptMainDel() {
fi
}
### Local clients
IPT_OUTPUT_FIRST_RULE="-j ${IPT_BLLIST_CHAIN}"
IptLocalClientsAdd() {