1

Hello Android Community!

How can I setup a L2TP/IPSEC connection on android using this IPSEC/IKEV2 library ? I didn't found any documentation about it. Also I am only able to setup a VPN connection using Open VPN but I want a solution for IPSEC protocol.There are many questions regarding setting up the IPSEC VPN protocol but there is no solution.

  • That library only provides IKEv2 (i.e. not IKEv1, which is commonly used with L2TP/IPsec) and plain ESP via Linux kernel (i.e. no L2TP). So that library might not be suitable for your use case anyway. – ecdsa Mar 31 '22 at 09:05
  • Can you suggest me a good library or method for setting up the IPSEC protocol connection on android. – MayankChoudhary Apr 01 '22 at 10:25
  • IPsec you can do with the library you referenced, but not L2TP (or IKEv1). – ecdsa Apr 01 '22 at 12:00
  • Thanks but can you send me a resource related to this or any documentation because I didn't find any docs on official android docs. @ecdsa – MayankChoudhary Apr 04 '22 at 07:57
  • I guess it's at [android.net.ipsec.ike](https://developer.android.com/reference/android/net/ipsec/ike/package-summary). No idea if it can be used in apps directly, but there are high-level interfaces that can, e.g. [android.net.IpSecManager](https://developer.android.com/reference/android/net/IpSecManager) (for individual sockets, not for tunnel mode VPNs) and [android.net.VpnManager](https://developer.android.com/reference/android/net/VpnManager) (for system-wide VPNs - for more flexibility, using VpnService and a third-party IKEv2/IPsec library like strongSwan's might be a better option). – ecdsa Apr 04 '22 at 09:26

0 Answers0