Problem with max speed via OpenVPN connection

This forum is for admins who are looking to build or expand their OpenVPN setup.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
celkabelka
OpenVpn Newbie
Posts: 2
Joined: Thu Apr 13, 2023 10:44 pm

Problem with max speed via OpenVPN connection

Post by celkabelka » Thu Apr 13, 2023 11:33 pm

Hello

I'm having difficulty getting the maximum possible bandwidth of an internet connection with a VPN connected.

My current location has a 500mbps internet connection (speedtest show 470mbps).

My server has a 10gbps connection (speedtest cli show 6-7gbps).

Openvpn server is configured on this server:
-

Code: Select all

Ubuntu 20.04
-

Code: Select all

OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022
library versions: OpenSSL 1.1.1f 31 Mar 2020, LZO 2.10
When connecting as an OpenVPN client to this server, I get 200-240 mbps on Speedtest.

What am I doing wrong?

Configurations below:
/etc/openvpn/server.conf

Code: Select all

port xxx
proto udp6
dev tune
user nobody
group no group
persist key
persist-tun
keep alive 10 120
subnet topology
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "redirect-gateway def1 bypass-dhcp"
server-ipv6xxx
tun-ipv6
push tun-ipv6
push "route-ipv6 2000::/3"
push "redirect-gateway ipv6"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key
crl-verify crl.pem
ca ca.crt
certxxx
key xxx
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
management 127.0.0.1 7505
txqueuelen 1000
msfix 0
fragment 0
fast io
client.ovpn

Code: Select all

client
proto udp
explicit-exit-notify
remote xxx xxx
dev tune
resolv-retry infinite
nobind
persist key
persist-tun
remote-cert-tls server
verify-x509-name xxx name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ignore-unknown-option block-outside-dns
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
/etc/sysctl.conf

Code: Select all

net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0

net.core.rmem_default=8388608
net.core.wmem_default=8388608
net.core.rmem_max=8388608
net.core.wmem_max=8388608
net.ipv4.ip_local_port_range=1024 65000
ps
I have read this article https://community.openvpn.net/openvpn/w ... orks_Linux

celkabelka
OpenVpn Newbie
Posts: 2
Joined: Thu Apr 13, 2023 10:44 pm

Re: Problem with max speed via OpenVPN connection

Post by celkabelka » Sun Apr 16, 2023 1:14 am

found the cause, the problem is related to the CPU, testing was on 1 core, if there is 2, the result is already 300+

Post Reply