Help Us Test L2TP PSK For Android!

Hi everyone,

With the amount of Android devices out there, we are looking to accommodate the L2TP over IPSec VPN capabilities of these users. TLDR: Android asks for Plain Chap authentication and Astaro at the moment says "nope'.

Rather than develop support in ASG for plain chap, another solution which brings the feature available much sooner is to have ASG just respond with "no, but give me ChapV2" which most Android devices can actually do just fine. Also we don't want to have anyone need to root their phone or do complex operations.  However rather than just say you MUST have android 2.3 and on a "new"  phone, we'd like to know the results others have on various hardware and  android-version combinations.

The solution is quite easy to "test".
On ASG
1) enable and configure L2TP in Webadmin the way you want it
2) login to ASG as root and go to /var/chroot-ipsec/etc/ppp
3) edit (joe or pico) "options" (if you havent enabled l2tp in webadmin yet this file wont exist, just a defaults file, see step 1).
4) at the bottom of the file, add the line "require-mschap-v2" (no quotes, no caps).
5) save the file
6) *OPTIONAL* restart IPSec service (warning will disconnect site-site tunnels and connected roadwarriors!) /var/mdw/scripts/ipsec-starter restart) optional because PPP options get applied during L2TP client reconnect, but if you notice weird log entry spam or oddities it might help.

On your Android Phone:
1) make an L2TP over IPSec with PSK connection to your ASG. (eg. Settings-->Wireless and network-->VPN Settings--"Add VPN")
*note that enable L2TP secret should be left blank!

Now connect. You should get a tunnel. Let us know how you did, and if this affects anything else like other L2TP tunnels which were working fine, or any abnormalities. If a tunnel wont connect, please give us a snippet of the ipsec.log (preferably with debug options from the advanced tab in ASG enabled). 

**Remember** if you cause ASG to rewrite the options file (by say making a change to L2TP in WebAdmin) you need to re-add that line to the options file again. Please double check that your addition is still there to the options file before claiming it doesn't work. A few testers have made this mistake already. You can also add the line to options-default. This way it stays if mdw rewrites the options file, but then is more permanent, which you might not want to "test" with.

Anything we can do to help? Let us know! We will look to add this for 8.200 if it looks promising without any big downfalls perhaps.
  • am i right that this won't work if i have my astaro behind NAT?

    Internet -> FritzBox(NAT) -> ASG

    Robert
  • you'd need to forward the appropriate ports through whatever firewall you have in front of it, but it should still work. This will depending mostly on the configuration and complexity of your fritz, and your expertise with it [:)]
  • maybe you wanna hav a look at this, here i'm got told that it doesn't work ...

    https://community.sophos.com/products/unified-threat-management/astaroorg/f/110/t/70221

    i have ALL ports forwardet to my astaro, the fritzbox is only in front because of HA!

    Robert
  • Ah, in that case your correspondence with D12 is final, he's the expert and def. knows best in things with VPN stuff.
  • Hi Angelo,
    Might this modification with with 7.5 or 8.1 also?

    Thanks,
    Barry
  • Hi barry,

    I'm not sure about V7, but in V8 it should be fine in 8.100 or later. Give it a shot. We'll not look to "support" it on V7, as it would "require" 8.200 or later officially, but feel free to experiment.
  • I tested by GaraxyTAB (Android2.2、carrier is NTTdocomo).
    All following logs uses same GaraxyTAB and ASG.

    It works fine in the line of carrier.
    However, it is not possible connect to ASG when the communication through the router of NAPT by WiFi.
    This is same result of V7.509 and V8.102 as the test.
    A part of Softbank line uses  NAPT. 
    In V7.509, Android that uses this Softbank line could't do L2TP connection.
    Unfortunately, I don't have this Android now. Therefore I can't test by 8.160.
    However, I guess that it failed VPN connection from the result of the test of WiFi.

    2011:03:14-12:02:23 hoge pluto[11747]: packet from ***.***.***.***:60102: received Vendor ID payload [RFC 3947]
    2011:03:14-12:02:23 hoge pluto[11747]: packet from ***.***.***.***:60102: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2011:03:14-12:02:23 hoge pluto[11747]: packet from ***.***.***.***:60102: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2011:03:14-12:02:23 hoge pluto[11747]: packet from ***.***.***.***:60102: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    2011:03:14-12:02:23 hoge pluto[11747]: packet from ***.***.***.***:60102: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    2011:03:14-12:02:23 hoge pluto[11747]: "S_REF_mflwDQcPTN_1"[6] ***.***.***.***:60102 #8: responding to Main Mode from unknown peer ***.***.***.***:60102
    2011:03:14-12:02:24 hoge pluto[11747]: "S_REF_mflwDQcPTN_1"[6] ***.***.***.***:60102 #8: NAT-Traversal: Result using RFC 3947: peer is NATed
    2011:03:14-12:02:24 hoge pluto[11747]: "S_REF_mflwDQcPTN_1"[6] ***.***.***.***:60102 #8: Peer ID is ID_IPV4_ADDR: '192.168.0.2'
    2011:03:14-12:02:24 hoge pluto[11747]: "S_REF_mflwDQcPTN_1"[7] ***.***.***.***:60102 #8: deleting connection "S_REF_mflwDQcPTN_1" instance with peer ***.***.***.*** {isakmp=#0/ipsec=#0}
    2011:03:14-12:02:24 hoge pluto[11747]: | NAT-T: new mapping ***.***.***.***:60102/60103)
    2011:03:14-12:02:24 hoge pluto[11747]: "S_REF_mflwDQcPTN_1"[7] ***.***.***.***:60103 #8: sent MR3, ISAKMP SA established
    2011:03:14-12:02:24 hoge pluto[11747]: "S_REF_mflwDQcPTN_1"[7] ***.***.***.***:60103 #8: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2011:03:14-12:02:25 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[2] ***.***.***.***:60103 #9: responding to Quick Mode
    2011:03:14-12:02:25 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[2] ***.***.***.***:60103 #9: IPsec SA established {ESP=>0x0caa5403 

    At least in my test, L2TPVPN has succeeded in the connection only when source port of NAT-T is 4500. 
    **Notice**
    I have changed the value of MTU/MRU.(/var/chroot-ipsec/etc/ppp/options)
    The packet of the career is set "Don't Fragment Bit".
    The value of 1380(default) might be inapposite.
    I know the PPPoE line that MTU is 1438.
    I hope to be able to set this value from WebAdmin.

    2011:03:14-11:57:59 hoge pluto[11747]: packet from yyy.yyy.yyy.yyy:4395: received Vendor ID payload [RFC 3947]
    2011:03:14-11:57:59 hoge pluto[11747]: packet from yyy.yyy.yyy.yyy:4395: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2011:03:14-11:57:59 hoge pluto[11747]: packet from yyy.yyy.yyy.yyy:4395: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2011:03:14-11:57:59 hoge pluto[11747]: packet from yyy.yyy.yyy.yyy:4395: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    2011:03:14-11:57:59 hoge pluto[11747]: packet from yyy.yyy.yyy.yyy:4395: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    2011:03:14-11:57:59 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4500 #4: responding to Main Mode from unknown peer yyy.yyy.yyy.yyy:4500
    2011:03:14-11:57:59 hoge pluto[11747]: | NAT-T: new mapping yyy.yyy.yyy.yyy:4500/4395)
    2011:03:14-11:58:01 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4395 #4: NAT-Traversal: Result using RFC 3947: peer is NATed
    2011:03:14-11:58:01 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4395 #4: Peer ID is ID_IPV4_ADDR: '10.174.117.241'
    2011:03:14-11:58:01 hoge pluto[11747]: | NAT-T: new mapping yyy.yyy.yyy.yyy:4395/4500)
    2011:03:14-11:58:01 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4500 #4: sent MR3, ISAKMP SA established
    2011:03:14-11:58:02 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4500 #4: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2011:03:14-11:58:03 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4500 #5: responding to Quick Mode
    2011:03:14-11:58:03 hoge pluto[11747]: "S_REF_mflwDQcPTN_0"[1] yyy.yyy.yyy.yyy:4500 #5: IPsec SA established {ESP=>0x0f979441  
    2011:03:14-11:58:06 hoge pppd-l2tp[12874]: Overriding mtu 1500 to 1372
    2011:03:14-11:58:06 hoge pppd-l2tp[12874]: PPPoL2TP options: lnsmode tid 53286 sid 37119 debugmask 0
    2011:03:14-11:58:06 hoge pppd-l2tp[12874]: Overriding mru 1500 to mtu value 1372
    2011:03:14-11:58:06 hoge pppd-l2tp[12874]: sent [LCP ConfReq id=0x1    ]
    2011:03:14-11:58:07 hoge pppd-l2tp[12874]: rcvd [LCP ConfReq id=0x1     ]
    2011:03:14-11:58:07 hoge pppd-l2tp[12874]: sent [LCP ConfAck id=0x1     ]
    2011:03:14-11:58:08 hoge pppd-l2tp[12874]: rcvd [LCP ConfReq id=0x1     ]
    2011:03:14-11:58:08 hoge pppd-l2tp[12874]: sent [LCP ConfAck id=0x1     ]
    2011:03:14-11:58:09 hoge pppd-l2tp[12874]: sent [LCP ConfReq id=0x1    ]
    2011:03:14-11:58:09 hoge pppd-l2tp[12874]: rcvd [LCP ConfReq id=0x1     ]
    2011:03:14-11:58:09 hoge pppd-l2tp[12874]: sent [LCP ConfAck id=0x1     ]
    2011:03:14-11:58:10 hoge pppd-l2tp[12874]: rcvd [LCP ConfAck id=0x1    ]
    2011:03:14-11:58:10 hoge pppd-l2tp[12874]: Overriding mtu 1400 to 1372
    2011:03:14-11:58:10 hoge pppd-l2tp[12874]: PPPoL2TP options: lnsmode tid 53286 sid 37119 debugmask 0
    2011:03:14-11:58:10 hoge pppd-l2tp[12874]: sent [CHAP Challenge id=0x4 , name = "hoge"]
    2011:03:14-11:58:10 hoge pppd-l2tp[12874]: rcvd [CHAP Response id=0x4 , name = "foo"]
    2011:03:14-11:58:12 hoge pppd-l2tp[12874]: AUAconnect - Returned IPAddr *
    2011:03:14-11:58:12 hoge pppd-l2tp[12874]: AUA: authentication of user foo succeeded
    2011:03:14-11:58:12 hoge pppd-l2tp[12874]: sent [CHAP Success id=0x4 "S=167F1C5FCD476D9C73AA32CAAB06D45BB5389866 M=Access granted"]
    2011:03:14-11:58:12 hoge pppd-l2tp[12874]: sent [IPCP ConfReq id=0x1 ]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: rcvd [CCP ConfReq id=0x1   ]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: Unsupported protocol 'Compression Control Protocol' (0x80fd) received
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: sent [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: rcvd [IPCP ConfReq id=0x1    ]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: sent [IPCP ConfRej id=0x1 ]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: rcvd [IPCP ConfAck id=0x1 ]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: rcvd [IPCP ConfReq id=0x2   ]
    2011:03:14-11:58:13 hoge pppd-l2tp[12874]: sent [IPCP ConfNak id=0x2   ]
    2011:03:14-11:58:14 hoge pppd-l2tp[12874]: rcvd [IPCP ConfReq id=0x3   ]
    2011:03:14-11:58:14 hoge pppd-l2tp[12874]: sent [IPCP ConfAck id=0x3   ]
    2011:03:14-11:58:14 hoge pppd-l2tp[12874]: Cannot determine ethernet address for proxy ARP
    2011:03:14-11:58:14 hoge pppd-l2tp[12874]: local  IP address 10.242.3.1
    2011:03:14-11:58:14 hoge pppd-l2tp[12874]: remote IP address 10.242.3.2
    2011:03:14-11:58:14 hoge pppd-l2tp[12874]: Script /etc/ppp/ip-up started (pid 12877)
    2011:03:14-11:58:15 hoge pppd-l2tp[12874]: id="2201" severity="info" sys="SecureNet" sub="vpn" event="Connection started" username="foo" variant="l2tp" srcip="yyy.yyy.yyy.yyy" virtual_ip="10.242.3.2"
    2011:03:14-11:58:15 hoge pppd-l2tp[12874]: Script /etc/ppp/ip-up finished (pid 12877), status = 0x0
  • I tested with Motorola Defy and Android 2.1. Works fine with 8.161:-)
  • Tested with v8.161,  Motorola Milestone and Android 2.2.1. Works fine with the "require-mschap-v2" option enabled.