-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Describe the bug
I recently upgraded from Ubuntu 22.04 (OpenVPN 2.5.11) to Ubuntu 24.04 (OpenVPN 2.6.14) and observed that my OpenVPN connection established via NetworkManager stopped working (connection was established, but SSL and SSH sessions become unresponsive after larger packages were dropped). After looking a bit into it, I found out that the default MTU was to blame. I needed to manually reduce the MTU from the default of 1500 to work with my provider (German 1&1, DSL, FritzBox 7590 as router (though that should not matter)). It seems like my provider has a threshold of 1452 bytes:
$ ping -c 1 -M do -s 1500 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 1500(1528) bytes of data.
ping: local error: message too long, mtu=1452
(Addendum: it works fine if I initiate the VPN while connected to a hotspot from my mobile phone (Vodafone Germany), it looks like their MTU is 1492)
Lowering the MTU to 1400 fixed the VPN for me (--tun-mtu 1400
), but it took me a while to debug this and was not a pleasant user experience. I got curious what might have caused this break, first thinking about NetworkManager, but that was not the culprit, as it uses default values if not instructed otherwise. I moved on to the OpenVPN code base and currently think the problem is to blame on the following commit/line, which is present in v2.6.14 (Ubuntu 24.04) but not in v2.5.11 (Ubuntu 22.04):
0d86da3#diff-56a343af9d1cad371a0776185663d147dd46e610038114f0fae77310e2fe8ddaR80
- #define MSSFIX_DEFAULT 1450
+ #define MSSFIX_DEFAULT 1492
The commit message is well crafted and also explains the rationale behind this particular change:
1492 was picked in our community meeting for being a very common
encapsulation upper bound.
Expected behavior
A value should be chosen that works by default for a majority of users. The old values seems to have accounted specifically for this (1450 is "1452 minus epsilon", and 1452 seems to be a common values when you google it), so I am not sure what led the community to this change.
To Reproduce
Try establishing a VPN connection on a OpenVPN version that contains said commit with an infrastructure that can only handle a MTU of 1452 bytes.
Additional Information
I was able to fix the problem for myself, I report this mainly because I think you might want to know about the fact that this change indeed breaks stuff for people. So there will be no further pressure from my side to change that value (though I think it would be a good idea). Also happy to provide more details or run simple tests if you instruct me how to.