openvpn TCP/UDP slow SSH/SMB performance

Posted by Petr Latal on Server Fault See other posts from Server Fault or by Petr Latal
Published on 2012-12-30T22:59:07Z Indexed on 2013/10/24 3:57 UTC
Read the original article Hit count: 625

Filed under:
|
|
|

I have question about strange behavior of my openVPN configuration on Debian lenny. I have 2 server configs (one proto tcp-server based and one proto udp based). ISP bandwidth is 7Mbit/7Mbit.

When I uses proto tcp-server my download server rate is fine around 6,4 Mbit/s, but upload rate is about 3Mbit/s.

When I uses proto udp, my download server rate is around 3Mbit/s and upload rate around 6,4Mbit/s.

I tried to handle the MTU, MSSFIX and cipher on/off on server and client configs to synchronize rates, but without solution.


Here is TCP based SERVER config:

mode server
tls-server
port 1194
proto tcp-server

dev tap0

ifconfig 11.10.15.1 255.255.255.0
ifconfig-pool 11.10.15.2 11.10.15.20 255.255.255.0

push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.200"
push "route-gateway 11.10.15.1"
push "dhcp-option WINS 192.168.1.200"

route-up /etc/openvpn/routeup.sh

duplicate-cn
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh2048.pem

log-append /var/log/openvpn.log
status /var/run/vpn.status 10
user nobody
group nogroup
keepalive 10 120
comp-lzo
verb 3
script-security 3
plugin /usr/lib/openvpn/openvpn-auth-pam.so system-auth
persist-tun
persist-key
mssfix
cipher BF-CBC

Here is UDP based SERVER config:

port 1194
proto udp
dev tun0
local xx.xx.xx.xx
server 11.10.15.0 255.255.255.0

ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh2048.pem

log-append /var/log/openvpn.log
status /var/run/vpn.status 10
user nobody
group nogroup
keepalive 10 120
comp-lzo
verb 3
duplicate-cn
script-security 3
plugin /usr/lib/openvpn/openvpn-auth-pam.so system-auth
persist-tun                     
persist-key
tun-mtu 1500
mssfix 1212
client-to-client
ifconfig-pool-persist ipp.txt

Here is TCP/UDP based windows CLIENT config:

remote xx.xx.xx.xx
--socket-flags TCP_NODELAY    
tls-client
port 1194
proto tcp-client 
#proto udp
dev tap 
#dev tun

pull
ca ca.crt
cert latis.crt
key latis.key
mute 0
comp-lzo adaptive
verb 3

resolv-retry infinite                   
nobind
persist-key                       
auth-user-pass                          
auth-nocache
script-security 2
mssfix 
cipher BF-CBC

© Server Fault or respective owner

Related posts about Performance

Related posts about openvpn