Guest User!

You are not Sophos Staff.

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.
  • HTC Desire 2.2

    did not connect, here is a copy of the log:

    2011:03:28-11:07:30 ruter pluto[16118]: packet from 213.233.87.7:62697: received Vendor ID payload [RFC 3947]
    2011:03:28-11:07:30 ruter pluto[16118]: packet from 213.233.87.7:62697: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2011:03:28-11:07:30 ruter pluto[16118]: packet from 213.233.87.7:62697: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2011:03:28-11:07:30 ruter pluto[16118]: packet from 213.233.87.7:62697: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    2011:03:28-11:07:30 ruter pluto[16118]: packet from 213.233.87.7:62697: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    2011:03:28-11:07:30 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[1] 213.233.87.7:62697 #1: responding to Main Mode from unknown peer 213.233.87.7:62697
    2011:03:28-11:07:31 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[1] 213.233.87.7:62697 #1: NAT-Traversal: Result using RFC 3947: peer is NATed
    2011:03:28-11:07:32 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[1] 213.233.87.7:62697 #1: Peer ID is ID_IPV4_ADDR: '10.89.101.127'
    2011:03:28-11:07:32 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[2] 213.233.87.7:62697 #1: deleting connection "S_REF_HGHiDPKvJk" instance with peer 213.233.87.7 {isakmp=#0/ipsec=#0}
    2011:03:28-11:07:32 ruter pluto[16118]: | NAT-T: new mapping 213.233.87.7:62697/1065)
    2011:03:28-11:07:32 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[2] 213.233.87.7:1065 #1: sent MR3, ISAKMP SA established
    2011:03:28-11:07:32 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[2] 213.233.87.7:1065 #1: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2011:03:28-11:07:33 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[1] 213.233.87.7:1065 #2: responding to Quick Mode
    2011:03:28-11:07:34 ruter pluto[16118]: "S_REF_HGHiDPKvJk"[1] 213.233.87.7:1065 #2: IPsec SA established {ESP=>0x06107e33 
  • HTC EVO w Android 2.2
    Astaro 8.102

    The VPN connects but routing doesn't seem to be working right.
    According to tcpdump, nothing is going through the tunnel.
    This includes both traffic to the local networks, as well as to the internet.

    Also, DNS is not working.

    I can hit a web server in the DMZ from the phone, by IP address, and the web server shows the connection is from the phone's Sprint address, not from the VPN IP.

    Does IPSEC need to be configured before configuring L2TP over IPSec?

    Thanks,
    Barry
  • ipsec.log:



    2011:03:28-17:18:51 fw pluto[7390]: packet from 72.62.225.37:500: received Vendor ID payload [RFC 3947]
    2011:03:28-17:18:51 fw pluto[7390]: packet from 72.62.225.37:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2011:03:28-17:18:51 fw pluto[7390]: packet from 72.62.225.37:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2011:03:28-17:18:51 fw pluto[7390]: packet from 72.62.225.37:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    2011:03:28-17:18:51 fw pluto[7390]: packet from 72.62.225.37:500: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    2011:03:28-17:18:51 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #29: responding to Main Mode from unknown peer 72.62.225.37
    2011:03:28-17:18:52 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #29: NAT-Traversal: Result using RFC 3947: no NAT detected
    2011:03:28-17:18:52 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #29: Peer ID is ID_IPV4_ADDR: '72.62.225.37'
    2011:03:28-17:18:52 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #29: sent MR3, ISAKMP SA established
    2011:03:28-17:18:52 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #29: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2011:03:28-17:18:53 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #30: responding to Quick Mode
    2011:03:28-17:18:53 fw pluto[7390]: "S_REF_iaNcjXoTEB_0"[1] 72.62.225.37 #30: IPsec SA established {ESP=>0x0c353221  
    2011:03:28-17:18:56 fw pppd-l2tp[9556]: Overriding mtu 1500 to 1380
    2011:03:28-17:18:56 fw pppd-l2tp[9556]: Overriding mru 1500 to mtu value 1380
    2011:03:28-17:18:59 fw pppd-l2tp[9556]: Overriding mtu 1400 to 1380
    2011:03:28-17:19:02 fw pppd-l2tp[9556]: Cannot determine ethernet address for proxy ARP
    2011:03:28-17:19:02 fw pppd-l2tp[9556]: local  IP address x.x.x.121
    2011:03:28-17:19:02 fw pppd-l2tp[9556]: remote IP address x.x.x.122
    2011:03:28-17:19:03 fw pppd-l2tp[9556]: id="2201" severity="info" sys="SecureNet" sub="vpn" event="Connection started" username="barry" variant="l2tp" srcip="72.62.225.37" virtual_ip="x.x.x.122"

    (manually disconnecting)

    2011:03:28-17:19:27 fw pppd-l2tp[9556]: LCP terminated by peer (User request)
    2011:03:28-17:19:27 fw pppd-l2tp[9556]: Connect time 0.5 minutes.
    2011:03:28-17:19:27 fw pppd-l2tp[9556]: Sent 0 bytes, received 0 bytes.
    2011:03:28-17:19:27 fw pppd-l2tp[9556]: Overriding mtu 1500 to 1380
    2011:03:28-17:19:27 fw pppd-l2tp[9556]: Overriding mru 1500 to mtu value 1380
    2011:03:28-17:19:27 fw pppd-l2tp[9556]: Terminating on signal 15
    2011:03:28-17:19:27 fw pppd-l2tp[9556]: id="2202" severity="info" sys="SecureNet" sub="vpn" event="Connection terminated" username="barry" variant="l2tp" srcip="72.62.225.37" virtual_ip="x.x.x.122"
    2011:03:28-17:19:29 fw pppd-l2tp[9556]: Modem hangup
    2011:03:28-17:19:29 fw pppd-l2tp[9556]: Connection terminated.
    2011:03:28-17:19:29 fw pppd-l2tp[9556]: Exit.


    Barry
  • Sony Xperia X10, Android 2.2 - Custom CyanogenMOD 6.1.3 ROM


    2011:05:02-03:12:19 thor pluto[2406]: packet from CLIENT-IP:500: received Vendor ID payload [RFC 3947]
    2011:05:02-03:12:19 thor pluto[2406]: packet from CLIENT-IP:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2011:05:02-03:12:19 thor pluto[2406]: packet from CLIENT-IP:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2011:05:02-03:12:19 thor pluto[2406]: packet from CLIENT-IP:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    2011:05:02-03:12:19 thor pluto[2406]: packet from CLIENT-IP:500: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    2011:05:02-03:12:19 thor pluto[2406]: "S_REF_KErlgzXuDQ"[14] CLIENT-IP #16: responding to Main Mode from unknown peer CLIENT-IP
    2011:05:02-03:12:20 thor pluto[2406]: "S_REF_KErlgzXuDQ"[14] CLIENT-IP #16: NAT-Traversal: Result using RFC 3947: peer is NATed
    2011:05:02-03:12:20 thor pluto[2406]: "S_REF_KErlgzXuDQ"[14] CLIENT-IP #16: Peer ID is ID_IPV4_ADDR: '10.157.25.8'
    2011:05:02-03:12:20 thor pluto[2406]: "S_REF_KErlgzXuDQ"[15] CLIENT-IP #16: deleting connection "S_REF_KErlgzXuDQ" instance with peer CLIENT-IP {isakmp=#0/ipsec=#0}
    2011:05:02-03:12:20 thor pluto[2406]: | NAT-T: new mapping CLIENT-IP:500/59152)
    2011:05:02-03:12:20 thor pluto[2406]: "S_REF_KErlgzXuDQ"[15] CLIENT-IP:59152 #16: sent MR3, ISAKMP SA established
    2011:05:02-03:12:20 thor pluto[2406]: "S_REF_KErlgzXuDQ"[15] CLIENT-IP:59152 #16: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2011:05:02-03:12:21 thor pluto[2406]: "S_REF_KErlgzXuDQ"[6] CLIENT-IP:59152 #17: responding to Quick Mode
    2011:05:02-03:12:21 thor pluto[2406]: "S_REF_KErlgzXuDQ"[6] CLIENT-IP:59152 #17: IPsec SA established {ESP=>0x0b642f7f 


    Phone reports that the connection was not successful and asks for a retry.
  • Tested with 8.102 and 8.103. Device used was HTC Desire Z with stock rom (Froyo 2.2.1). Everything works ok so far.
  • ok, I am hoping someone here can shed some light on the issues I am having with this config, I am so close I can taste it!

    With the growing popularity of Droids in my office, I decided to give this config a try (not to mention my CEO got himself a Droid and wants VPN access...). I myself am running a Doid X, rooted and have configured OpenVPN. Works nice but a pain to setup and you have to root.

    We are running an ASG 220 V7.510, 512MB ram and we are stuck at this version until we buy new hardware (not going to happen this year!!).

    Anyway, I set up the L2TP and added the "require-mschap-v2" to /var/chroot-ipsec/etc/ppp/options. Moved over and setup my Droid X running 2.2.1. Hit connect and boom connected first try! Browsed to network shares, the intranet, I was super stoked! I then disconnected the Droid and tried to reconnect to the webadmin panel and that is when things got weired, I could not access it?? I could not even ping my external IP either?? Finally, using a logmein account, I logged into the webadmin from the internal LAN and turned off L2TP. After turning this off, everything was back to normal. I then turned L2TP back on but could not longer connect using the phone. I had to ssh back in and re-add the "require-mschap-v2", it was gone? was the file overwritten?? After re-adding, I could then connect the phone however, it did the same thing again. What gives? What am I missing here? I can connect once but then I have to toggle the L2TP remote access on and off again and re-add the line to the options file.

    Any help would be greatly appreciated!
  • dkirk:  to quote the instructions from AngeloC in the first post:

    **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


    This would include disabling/enabling, as that does make system config changes.

    Now, onto your little WebAdmin problem.  Did you add the VPN pool to the allowed networks list for WebAdmin (Management>>WebAdmin Settings)?
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
  • Hi dkirk,

    did you connected to the ASG over WLAN behind a NAT router and so used the same source ip which you used later to access the webadmin? If so then the l2tp session wasn't really disconnected at ASG and so the routing back to this source ip is only done over the l2tp tunnel. 
    After turning l2tp of the session got terminated and everything works again. Scott_Klassen exactly pointed out why the configline is gone after the disabling/enabling. If you add the line to /var/chroot-ipsec/etc/ppp/options-default then the setting will stay there.

    Marco
  • Many thanks for the responses! My apologies for not seeing the bit about the options file, I have gone in and added it to the options-default file.

    As far as the connecting to the webadmin, I was trying to access it from my laptop not from the droid. I could not even ping the external interface or connect using the Astaro OpenVPN client from my laptop until I toggled the L2TP service off and on again.

    Our ASG 220 is behind a Cisco 1820 that is only bonding 2 T1's, there really is not any configuration to it other than the bonding.

    I have setup the L2TP according to post #7 of this thread by ArunGupta.

    I have tried again this morning after adding the line to the options-default file and things are the same (of course all this did was make the line permanent, no other settings were changed). Any suggestions? Should I drop back and give PPTP a try? Thanks again for the help!
  • as a follow up, just configured PPTP and everything works fine, nothing "breaks" after connecting.

    Honestly, I would rather not use PPTP if I can get the L2TP working correctly.