IOS – iPad/iPhone AnyConnect VPN wrong MTU size

iosipadiphoneunixvpn

I try to connect with a iPad (iOS 5.1) and the AnyConnect app to connect to a OpenVPN server on a Debian server. But this warning always appears in the OpenVPN log:

WARNING: Bad encapsulated packet length from peer (5635), which must
be > 0 and <= 1560 — please ensure that –tun-mtu or –link-mtu is
equal on both peers

On the server side the tun interface mtu size is 1500 bytes.
I can connect with other clients (pcs, macs, …) to the server. But with a iPad or iPhone client this warning appears and no connection is established.

How can I fix this?

Br

Best Answer

Unfortunately, it isn't possible to set the MTU on iOS. There is no GUI for it, and without jailbreaking you can't access the ifconfig command line tool that would be used to configure this on OS X (I think ifconfig might not exist anyway even if you do jailbreak).

I have the same problem with a VPN I use occasionally. To use it with OS X I have to run sudo ifconfig ppp0 mtu 1270. From iOS there is no solution, however I've noticed VLC clients seem to work fine even with a broken MTU and am able to access the office network that way.

To fix this, you're going to have to configure your server somehow - that would be a good question for Serve Fault.