mirror of https://github.com/apache/cloudstack.git
bug CS-15852: Add vpn usage rules in iptables magle table
status CS-15852: resolved fixed
This commit is contained in:
parent
20ba086d99
commit
c5d2a84ade
|
|
@ -44,10 +44,10 @@ create_vpn_usage_rules () {
|
|||
iptables-save|grep "VPN_STATS_$ethDev" > /dev/null
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
iptables -N VPN_STATS_$ethDev > /dev/null;
|
||||
iptables -I FORWARD -j VPN_STATS_$ethDev > /dev/null;
|
||||
iptables -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null;
|
||||
iptables -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null;
|
||||
iptables -t mangle -N VPN_STATS_$ethDev > /dev/null;
|
||||
iptables -t mangle -I FORWARD -j VPN_STATS_$ethDev > /dev/null;
|
||||
iptables -t mangle -A VPN_STATS_$ethDev -i $ethDev -m mark --mark $vpninmark > /dev/null;
|
||||
iptables -t mangle -A VPN_STATS_$ethDev -o $ethDev -m mark --mark $vpnoutmark > /dev/null;
|
||||
fi
|
||||
return $?
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue