#!/bin/sh
RATE_MAX=$1`echo kbps`
IP=kriek

DEV="dev eth0"

tc qdisc del $DEV root
tc qdisc add $DEV root handle 10: tbf rate $RATE_MAX buffer 20Kb/8 limit 15Kb
 
iptables -F
iptables -X
iptables -N acc_0
#iptables -A OUTPUT -t mangle -p tcp --dport 2000 -d $IP -j MARK --set-mark 1
iptables -A OUTPUT -t mangle -j MARK --set-mark 1
#iptables -A OUTPUT -p tcp --dport 2000 -d $IP -j acc_0
iptables -A OUTPUT -j acc_0
iptables -A OUTPUT -j ACCEPT
