How to prioritize openvpn traffic?

Posted by aditsu on Server Fault See other posts from Server Fault or by aditsu
Published on 2010-10-14T07:02:34Z Indexed on 2012/10/27 5:06 UTC
Read the original article Hit count: 438

Filed under:
|
|
|

I have an openvpn server, with one network interface. VPN traffic is extremely slow. I tried to do traffic control with this configuration (currently):

qdisc del dev eth0 root
qdisc add dev eth0 root handle 1: htb default 12
class add dev eth0 parent 1: classid 1:1 htb rate 900mbit

#vpn
class add dev eth0 parent 1:1 classid 1:10 htb rate 1500kbit ceil 3000kbit prio 1
#local net
class add dev eth0 parent 1:1 classid 1:11 htb rate 10mbit ceil 900mbit prio 2
#other
class add dev eth0 parent 1:1 classid 1:12 htb rate 500kbit ceil 1000kbit prio 2

filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 1194 0xffff flowid 1:10
filter add dev eth0 protocol ip parent 1:0 prio 2 u32 match ip dst 192.168.10.0/24 flowid 1:11

qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
qdisc add dev eth0 parent 1:11 handle 11: sfq perturb 10
qdisc add dev eth0 parent 1:12 handle 12: sfq perturb 10

But it's still extremely slow. I have an imaps connection that keeps transferring data continuously (I successfully limited the rate) but with openvpn I can't seem to get more than about 100kbit/s

The internet connection speed is about 3mbit/s (symmetric)

What could be the problem? Does the sport filter work for udp?

© Server Fault or respective owner

Related posts about linux

Related posts about openvpn