I've been using OpenVPN for over 2 years now, and since a few days I'm experiencing very slow or even unusable connections with high packet loss.
My setup:
OpenWRT router with OpenVPN installed as a server.
Clients: 2 Windows machines, 2 Raspberry Pis running Debian, 2 iOS devices.
The weird thing is that I haven't changed any of the server or client config files and the iOS devices aren't experiencing any issues at all and are connected to the same network.
The server's bandwidth has a 20 Mbps upload capacity. Speedtests on the iOS devices come close to that (18.x Mbps), while the other Windows and Linux-based devices reach 0.1 Mbps and suffer from lots of packet loss and latency (normal RTT should be around 140ms). Ping tests show:
~ $ ping 172.16.0.1 -i 0.2 -M do -S 1500
PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.
64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=481 ms
64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=541 ms
64 bytes from 172.16.0.1: icmp_seq=3 ttl=64 time=728 ms
….
--- 172.16.0.1 ping statistics ---
49 packets transmitted, 38 received, 22% packet loss, time 9735ms
rtt min/avg/max/mdev = 480.109/1697.443/2134.607/554.107 ms, pipe 11
Server config:
dev tun
proto udp
port 1194
persist-key
persist-tun
keepalive 10 120
txqueuelen 1000
#LOGGING
verb 3
status /etc/openvpn/status.log
log /etc/openvpn/openvpn.log
#Crypto
ca /etc/openvpn/root.pem
cert /etc/openvpn/nlrouter.pem
key /etc/openvpn/nlrouter.key
dh /etc/openvpn/dh2048.pem
cipher AES-256-CBC
auth SHA256
server 172.16.0.0 255.255.255.0
push redirect-gateway def1
push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.1"
Other related posts mentioning slow connections or packet loss mostly point to MTU problems.
I have tried lowering the values for tun-mtu down to 1400 by increments of 10, and likewise for mssfix.
I'm not using the fragment directive since that's supposedly not supported by the iOS clients.
Not sure if this is the problem, I would really appreciate your help.
(Have also tried reinstalling OpenVPN on both client and server, same results.)