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?


  • Hmm, from what I can see AnyConnect doesn't support OpenVPN servers at all? – Robert Ivanc Jan 9 '13 at 16:17

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.

  • 1
    I think it does exist, I've used it a few time on my iPad. But command line network utilities on iOS devices is quite crappy. – Shane Hsu Apr 23 '13 at 4:58
  • @ShaneHsu do you have any example of such tool? – Johan Karlsson Dec 11 '15 at 8:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .