OpenVPN very slow on Debian 6 x86

All comments and questions related to the functionality of the OpenVPN web pages and forum should go here.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Djoul
OpenVpn Newbie
Posts: 8
Joined: Wed Feb 01, 2012 5:55 pm

OpenVPN very slow on Debian 6 x86

Post by Djoul » Mon Feb 20, 2012 12:56 am

Hi,
I've a dedicated server.

Specifications :

O.S. : Debian 6.0 à jour
Network : 1Gbs Full Duplex
RAM : 4Go
Processor : AMD Athlon II X2 250 Dual-Core 2x3 Ghz

So, I used this tutorial to configure and install openvpn > http://blog.nicolargo.com/2010/10/insta ... buntu.html

Server.conf :

Code: Select all

# Serveur TCP/443
mode server
proto tcp
port 443
dev tun
# Cles et certificats
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
cipher AES-256-CBC
# Reseau
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 4.4.4.4"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
# Securite
user nobody
group nogroup
chroot /etc/openvpn/jail
persist-key
persist-tun
comp-lzo
# Log
verb 3
mute 20
status openvpn-status.log
log-append /var/log/openvpn.log
Client.conf :

Code: Select all

# Client
client
dev tun
proto tcp-client
remote MO.IP.LA.LA 443 (masqué par sécurité) 
resolv-retry infinite
cipher AES-256-CBC
# Cles
ca ca.crt
cert djoul.crt
key djoul.key
tls-auth ta.key 1
# Securite
nobind
persist-key
persist-tun
comp-lzo
verb 3
Even when I am the only one using the server = < 200KB / s download... An idea? Usually, I type to 1.3 MB / s ...

I used port 443 (SSL), but if I replace it with 80, my problem is there?

Thank you in advance!

PS : Sorry for my bad english, i'm french.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN very slow on Debian 6 x86

Post by janjust » Mon Feb 20, 2012 12:54 pm

try lowering the MTU on the tun/tap adapter on both sides , for example add

Code: Select all

tun-mtu 1300

Djoul
OpenVpn Newbie
Posts: 8
Joined: Wed Feb 01, 2012 5:55 pm

Re: OpenVPN very slow on Debian 6 x86

Post by Djoul » Mon Feb 20, 2012 1:12 pm

janjust wrote:try lowering the MTU on the tun/tap adapter on both sides , for example add

Code: Select all

tun-mtu 1300
Hello,
Thank you for the reply.
So, I add this line in server.conf or clien.conf ?
Sorry, I'm begginer :s

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN very slow on Debian 6 x86

Post by janjust » Mon Feb 20, 2012 1:52 pm

you need to add this to both client and server configs; if the client is running a version of Windows then you will also need to lower the MTU on the tap-win32 adapter itself.

Djoul
OpenVpn Newbie
Posts: 8
Joined: Wed Feb 01, 2012 5:55 pm

Re: OpenVPN very slow on Debian 6 x86

Post by Djoul » Mon Feb 20, 2012 2:24 pm

Thank you, it's a bit faster (I go up to 400k / s). I think the problem is the port 443 (ssl), how to change into 80? because if I change it in the server.conf, I replace 443 by 80, openvpn refuses to restart.

Djoul
OpenVpn Newbie
Posts: 8
Joined: Wed Feb 01, 2012 5:55 pm

Re: OpenVPN very slow on Debian 6 x86

Post by Djoul » Tue Feb 21, 2012 6:08 pm

Any idea ?

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN very slow on Debian 6 x86

Post by janjust » Tue Feb 21, 2012 9:55 pm

changing the port from 443 to 80 won't help much.
You could try playing with the MTU size a bit more (e.g. lower it even more to see what that does )
Also, try adding

Code: Select all

mssfix 0
to see if it has any effect.

OpenVPN will have some performance impact, but with a Linux client and a Linux server you can achieve up to 95% of your original 1.3 Mbps line.

Djoul
OpenVpn Newbie
Posts: 8
Joined: Wed Feb 01, 2012 5:55 pm

Re: OpenVPN very slow on Debian 6 x86

Post by Djoul » Wed Feb 22, 2012 1:13 pm

janjust wrote:changing the port from 443 to 80 won't help much.
You could try playing with the MTU size a bit more (e.g. lower it even more to see what that does )
Also, try adding

Code: Select all

mssfix 0
to see if it has any effect.

OpenVPN will have some performance impact, but with a Linux client and a Linux server you can achieve up to 95% of your original 1.3 Mbps line.
It's not better ... :? If you wish, I can give you SSH access to see
Regards

Post Reply