Hi,
I have a server running openvpn server within a docker container, testing the transfer performance to the server using iperf gives full bandwidth (1Mbps down, 0.5Mbps up) and (80 ~ 85ms) without VPN, however once I connect using VPN my latency jumps around 40ms (120 ~ 125ms) and my transfer slows down to (0.2 Mbps down, 0.5 Mbps up).
I've tried to change the configuration to use tcp instead of udp, change the port numbers and use different connections (and ISPs) to rule out packet shaping and throttling, and still hit the same brick, perfect transfers off vpn, very bad transfer while connected to vpn.
Another very weird symptom is that sometimes (very rarely and after a lot of trials) I could connect one client to the server (from the same local network) and that client would have the full bandwidth however any other client (from the same local network) would still suffer the slow speeds.
Here is my Server configuration: (nothing special at all)
server 192.168.255.0 255.255.255.0
verb 3
key /etc/openvpn/pki/private/[HOST].key
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/[HOST].crt
dh /etc/openvpn/pki/dh.pem
tls-auth /etc/openvpn/pki/ta.key
key-direction 0
keepalive 10 60
persist-key
persist-tun
proto udp
# Rely on Docker to do port mapping, internally always 1194
port 1194
dev tun0
status /tmp/openvpn-status.log
user nobody
group nogroup
#push dhcp-option DNS 8.8.8.8
#push dhcp-option DNS 8.8.4.4
push dhcp-option DNS 208.67.222.222
push dhcp-option DNS 208.67.220.220
route 192.168.254.0 255.255.255.0
sndbuf 0
rcvbuf 0
push "sndbuf 0"
push "rcvbuf 0"
And here is a sample client configuration:
client
nobind
dev tun
remote-cert-tls server
remote HOST 1194 udp
<key>
KEY HERE
</key>
<cert>
CERTIFICATE HERE
</cert>
<ca>
CERTIFICATE HERE
</ca>
<tls-auth>
KEY HERE
</tls-auth>
key-direction 1
redirect-gateway def1
I also tried adjust the MTU and MSS on both server and client to no avail.
Note: this configuration used to work fine until around 2 weeks ago after I had to move my server to a different datacenter.
Thanks