gluetun icon indicating copy to clipboard operation
gluetun copied to clipboard

allow to change MTU for all VPNs

Open ak370 opened this issue 1 year ago • 3 comments

What's the feature 🧐

In certain circumstances MTU needs to be smaller as some networks have issues. Wireguard side seems to have now(link below) MTU parameter but not OpenVPN. Can there be a feature that allows setting lower MTU irrespective of if it is Wireguard or OpenVPN. I resolve OpenVPN MTU limit problem simply executing below after starting the container, however this should be configurable parameter. docker exec f86573009ed6 /sbin/ip link set dev tun0 up mtu 1300

https://github.com/qdm12/gluetun/issues/1650

Extra information and references

No response

ak370 avatar Jan 13 '24 00:01 ak370

Does using OPENVPN_MSSFIX=1272 fixes it (1300-28)?

qdm12 avatar Apr 29 '24 13:04 qdm12

Does using OPENVPN_MSSFIX=1300 fixes it?

This flag doesn't to change the MTU is still 1500, however unable to verify as it works at the moment without any flags anyway.

2: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 500 link/none

ak370 avatar Apr 29 '24 14:04 ak370

See the mssfix documentation at https://openvpn.net/community-resources/reference-manual-for-openvpn-2-6/

Basically the mtu is unchanged, but internal TCP connections will have packets at most as MTU-MSSFIX. I guess your issues are related to TCP (tunneled over UDP), if you have issues with UDP tunneled over UDP, then using the --fragment option might be of interest but that's rather rare so far and I would prefer to no add this option.

qdm12 avatar May 02 '24 08:05 qdm12

Is this resolved now? Can this be closed? Thanks!

qdm12 avatar Jul 27 '24 11:07 qdm12

Closed issues are NOT monitored, so commenting here is likely to be not seen. If you think this is still unresolved and have more information to bring, please create another issue.

This is an automated comment setup because @qdm12 is the sole maintainer of this project which became too popular to monitor issues closed.

github-actions[bot] avatar Jul 29 '24 06:07 github-actions[bot]