[Solved]High downstream traffic from v. 2.5.7 server vs v. 2.4.8
Posted: Tue Nov 01, 2022 6:33 pm
by Aitarus
Hi.
I'm using two OVPN servers on two different Windows 10 machines and both of them are in the same physical network.
One server is version 2.4.8 and the recent one 2.5.7 and both allow to see other computers on physical network. Strange thing is that except difference between TLS authentication (tls-auth vs tls-crypt-v2) both of them are configured the same, but there is huge difference in downstream traffic between the two.
When I'm connected from the same client device (be it PC or cell phone) to Ovpn server v. 2.5.7 downstream traffic is pretty much 2 time higher than when i'm connected to ovpn server v. 2.4.8. Likewise when I'm downloading a chunk of data from database, on v. 2.4.8 it takes 1.7 MiB (about 14 seconds), but when i reconnect to v. 2.5.7 the same operation takes 3.5-4.0 MiB (about 40-45 seconds). On older server using RDP and downloading lots of data from database (by Grafana for instance) using up like about 80-150 MiB downstram after one hour of work. On new server after few minutes of barely starting RDP session it's already 80 MiB or more.
Could it be that this new tls certificate generates this much traffic?
P.S. Compresion by lz4 is set on both servers.
Re: High downstream traffic from v. 2.5.7 server vs v. 2.4.8
Posted: Tue Nov 01, 2022 8:21 pm
by Pippin
Hi,
No, I wouldn't think.
Sounds puzzling.....
You can test a download of a fixed file size of lets say 50 MiB and time it.
Download from outside of the physical network where the servers are located.
Download from both servers directly and from the database machine (all the same 50 MiB file).
It might be helpful to post logs of the tests of servers and client from the moment the client connects, downloads and disconnects: viewtopic.php?t=22603#p68963
Re: High downstream traffic from v. 2.5.7 server vs v. 2.4.8
Posted: Wed Nov 02, 2022 7:08 pm
by Aitarus
Thanks for your advice Pippin.
I downloaded 50 MiB CSV file from both PCs to client PC outside local network. But before that, I copied config files etc. from 2.4.8 to 2.5.7, so both servers were running on the same configuration.
Config file for server is:
server
port 3791
proto udp
dev tun
ca [path]\\ca.crt
cert [path]\\server.crt
key [path]\\server.key
dh [path]\\dh4096.pem
topology subnet
server 10.9.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.0.0.0 255.255.255.0"
client-to-client
keepalive 10 120
tls-auth [path]\\ta.key 0
cipher AES-256-GCM
compress lz4-v2
push "compress lz4-v2"
persist-key
persist-tun
status openvpn-status.log
verb 3
Client config is:
client
client
dev tun
proto udp
remote [IP] 3791
resolv-retry infinite
nobind
persist-key
persist-tun
ca [path]\\ca.crt
cert [path]\\client.crt
key [path]\\client.key
remote-cert-tls server
tls-auth [path]\\ta.key" 1
cipher AES-256-GCM
comp-lzo
verb 3
Results of downloading files using Robocopy:
2.4.8
Bytes : 50.18 m
Times : 0:03:27
Speed : 254292 Bytes/sec.
Speed : 14.550 MegaBytes/min.
OVPN Client GUI: received 20.8 MiB
Could it be that something within Windows causes this (like retransmissions or such)? Or maybe Ovpn won't compress packets before sending
them?
In addition, below is a snippet from Wireshark log during file download. Wireshark was listening on Windows-TAP device on client side.
I am not sure this behaves the same between the versions you use, 2.4.8 and 2.5.7.
If possible, update 2.4.8 to latest.
It looks like 2.4.8 does compress and 2.5.7 does not.
You can comment those two #[push] compress and #lzo and try again (meaning without compression).
Take a smaller file, say 20-25 MiB.
Re: High downstream traffic from v. 2.5.7 server vs v. 2.4.8
Posted: Fri Nov 04, 2022 6:28 pm
by Aitarus
Well, apparently I'm guilty of updating software without prior reading the release notes and such
Your link to site with compression configuration is spot on.
On version >= 2.5 you suppose to add --allow-compression yes and --compress lz4 on server and --allow-compression asym and --compress lz4 on client and it works like a charm
But I noticed that while it works fine on PC client, when you use VPN Connect on Android (in my case), you can connect to server no problem, but there's no traffic. For some reason I had to add "Push compress lz4" on server configuration to get compression properly initialized on Android and only then I could use the tunnel and see PCs behind it.