Instable tunnel within a VirtualBox VM

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
FunnyDingo
OpenVpn Newbie
Posts: 2
Joined: Thu Feb 08, 2018 8:34 am

Instable tunnel within a VirtualBox VM

Post by FunnyDingo » Thu Feb 08, 2018 10:14 am

Hello @ll,

I've a very confusing problem with my setup:

Server: Debian 9.3 with OpenVPN 2.4.0
Client: Win 7 VirtualBox VM on Win 10 Host with OpenVPN 2.4.4

The tunnel is very unstable. Sometimes downloads break down to 0 bit/s for a few seconds, sometimes completely.

I did some tests with iperf. The max. speed between client and server outside of the tunnel is around 85MBit/s up and down. That's okay. Speed within the tunnel is bad with max. 2 MBit/s. But more interessting is this (iperf -R on the client, output on the server side):

Code: Select all

Accepted connection from 10.8.0.6, port 51959
[  5] local 10.8.0.1 port 5201 connected to 10.8.0.6 port 51960
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  5]   0.00-1.00   sec  76.9 KBytes   629 Kbits/sec    1   1.33 KBytes
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec    1   2.65 KBytes
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec    0   13.3 KBytes
[  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec    0   14.6 KBytes
[  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec    0   14.6 KBytes
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec    0   15.9 KBytes
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec    0   15.9 KBytes
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    0   17.2 KBytes
[  5]   8.00-9.00   sec   368 KBytes  3.02 Mbits/sec   38   2.65 KBytes
[  5]   9.00-10.00  sec   211 KBytes  1.73 Mbits/sec   24   2.65 KBytes
[  5]  10.00-11.00  sec   362 KBytes  2.96 Mbits/sec   31   5.30 KBytes
[  5]  11.00-12.00  sec   262 KBytes  2.15 Mbits/sec   21   5.30 KBytes
[  5]  12.00-13.00  sec   260 KBytes  2.13 Mbits/sec   20   2.65 KBytes
[  5]  13.00-14.00  sec   200 KBytes  1.64 Mbits/sec   24   7.95 KBytes
[  5]  14.00-15.00  sec   266 KBytes  2.18 Mbits/sec   17   5.30 KBytes
[  5]  15.00-16.00  sec   297 KBytes  2.43 Mbits/sec   25   2.65 KBytes
[  5]  16.00-17.00  sec   262 KBytes  2.15 Mbits/sec   20   6.63 KBytes
[  5]  17.00-18.00  sec   264 KBytes  2.16 Mbits/sec   20   3.98 KBytes
[  5]  18.00-18.31  sec  87.5 KBytes  2.35 Mbits/sec    4   6.63 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-18.31  sec  2.85 MBytes  1.31 Mbits/sec  246             sender
[  5]   0.00-18.31  sec  0.00 Bytes  0.00 bits/sec                  receiver
I'm confused about the 0 bit/s from second 1 to 8. No data transfer? AND this happens only within the VM. If I establish a tunnel directly from the Win 10 host, this issue does not occur. Also, it makes no difference if the VMs network adapter is configured to run in NAT or bridged mode. Also the direct iperf connection between VM and server is not affected by this problem.

Any idea how I could find the cause for that?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Instable tunnel within a VirtualBox VM

Post by TinCanTech » Fri Feb 09, 2018 3:20 pm

I have used VirtualBox for sometime and have not seen such issues with OpenVPN.

Currently, I am using Hyper-V on Win10 to host numerous Virtual Linux nodes and also have never seen such problems. My VMs run 24hours and are also used by the OpenVPN dev team as buildbot slaves so they are regularly and thoroughly tested. If such an issue were to occur I would have devs telling me to fix my system.

I can only imagine that you have either configured OpenVPN or Virtualbox incorrectly ..

FunnyDingo
OpenVpn Newbie
Posts: 2
Joined: Thu Feb 08, 2018 8:34 am

Re: Instable tunnel within a VirtualBox VM

Post by FunnyDingo » Wed Sep 12, 2018 9:05 am

OK, old topic but I found the reason: it was a udp flood protection on one firewall.

I added an exception for the udp port and that solved the problem ;) (even if's slower than it could, but that's another problem)

flint2003
OpenVPN User
Posts: 23
Joined: Mon Sep 24, 2018 11:48 am

Re: Instable tunnel within a VirtualBox VM

Post by flint2003 » Thu Sep 27, 2018 6:12 am

Yes, the really first step for all of that: TURN OFF your firewall!!!! (OS Windows). Then establish the reliable connection and begin to play with firewalls

Post Reply