bug CS-15852: Add vpn usage rules in iptables magle table

status CS-15852: resolved fixed
This commit is contained in:
kishan 2012-08-09 23:03:54 +05:30
parent 20ba086d99
commit c5d2a84ade
1 changed files with 4 additions and 4 deletions

View File

@ -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 $?
}