I have an Ubuntu 14.04 Server on Amazon EC2 running OpenVPN server and am running udp bandwidth tests with iperf3. In this case, the OpenVPN Server is running as the iperf3 server as well.
When I use a Windows laptop to connect as the OpenVPN client, and perform the iperf3 tests, the connection seems fine. Packet loss is minimal (less than 5%). In addition, when I use an Ubuntu laptop to connect as the OpenVPN client and perform the iperf3 tests, the connection seems similarly fine.
The issue I am having is when create an Ubuntu virtual machine (VM) on the Windows laptop, and connect with the OpenVPN client on the VM. Running iperf3 from that VM shows around 30-40% dropped packets. Accordingly, "ifconfig" shows that tap0 is dropping packets. Note that if I disconnect the OpenVPN connection on the VM, and connect on the base Windows installation with the same client configuration, I get little to no packet loss. Using OpenVPN from the Ubuntu VM seems to be causing dropped packets. Any ideas on the cause and remediation?
Server.conf is as follows:
;local a.b.c.d
port 1194
;proto tcp
proto udp
dev tap
;dev tun
;dev-node MyTap
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem
server 13.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
;server-bridge
;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"
client-config-dir ccd
route 192.168.41.0 255.255.255.0
route 192.168.50.0 255.255.255.0
route 192.168.52.0 255.255.255.0
route 239.255.0.0 255.255.255.0
route 13.5.0.0 255.255.255.0
route 192.168.1.0 255.255.255.0
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
;learn-address ./script
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
client-to-client
push "route 192.168.50.0 255.255.255.0"
push "route 192.168.41.0 255.255.255.0"
push "route 192.168.52.0 255.255.255.0"
push "route 239.255.0.0 255.255.255.0"
push "route 13.5.0.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
;duplicate-cn
keepalive 10 120
;tls-auth ta.key 0 # This file is secret
;cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
comp-lzo
;max-clients 100
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log
;log-append openvpn.log
verb 3
;mute 20
sndbuf 0
rcvbuf 0
push "sndbuf 393216"
push "rcvbuf 393216"
Client ovpn file is as follows:
client
dev tap
;dev tun
;dev-node MyTap
;proto tcp
proto udp
remote server.hostname.substitute 1194
;remote my-server-2 1194
;remote-random
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
;mute-replay-warnings
ns-cert-type server
;tls-auth ta.key 1
;cipher x
comp-lzo
verb 3
;mute 20
<ca>
-----BEGIN CERTIFICATE-----
blahblahblah
-----END CERTIFICATE-----
</ca>
<cert>
blahblahblah
</cert>
<key>
blahblahblah
</key>