A few months ago, I wrote about setting up an OpenVPN server on Windows. I was mainly using this to VNC to my workstation, and I noticed some pretty poor performance occasionally. It wasn't that the connection speed was slow -- it was actually dropping the connection almost every minute or so.

At first, I decided that it was the WiFi network I was on. Maybe there was congestion. Or maybe OpenVPN on Windows is just bad. After some research, I found that the problem may have been an incorrect MTU (maximum transmission unit). According to Sonassi's knowledge base, symptoms of incorrect MTU include:

  • Slow VPN performance
  • Incomplete page load of resources

I decided to give it a shot and identify the correct MTU for my server:

ping -n 1 -l 1500 -f www.example.com

According to the directions, decrease the 1500 value by 10 each time until the ping succeeds. For my workstation, 1470 was the right value.

Finding the right MTU via ping

Next I had to update the MTU for the OpenVPN TAP network adapter.

Open the adapter settings

In the MTU section, put the value for your workstation.

Input the MTU value

Finally, update your server.ovpn config and use MTU-40 for your mssfix. For me, it's 1430.

mssfix 1430

I found this was really useful for fixing the dropped connections. Hopefully it helps your Windows OpenVPN server as well.

June 23, 2019 | 2 comments

Comments

Interesting!

DD | June 26, 2019

Thanks! :)

Michael | June 27, 2019
© 2019 Michael Cheng
made in Taiwan