Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Android to Astaro VPN

I have seen a couple of threads with people attempting and successfully getting a vpn connection between the Astaro Gateway and an Android phone. 

I have been trying to brute force my way through setting it up and I am coming up with nothing. Would someone be willing to share with me their L2TP Ipsec configuration so I can attempt to mimic it?

Upon achieving a successful connection I will immediately proclaim your brilliance to all of twitter. 

Thank you in advance for your assistance!


This thread was automatically locked due to age.
  • The only thing that I may be doing that might be different is that I have 6 network cards that are part of a bridge for the internal network. I think I am going to give up on this for now and revisit the VPN connection in a few months. I appreciate the info that you shared with me.
  • What device and network are you using?

    I have been fighting this for a while on and off.  I am using an HTC Incredible, Android 2.2 on Verizon here in the US.  Now that I have 8.101 installed I have turned off my radius server.  I was using radius authentication because Astaro did not support CHAP.  That was working for a while and now I back to local authentication.

    What I found is I can connect to my L2TP over IPsec connection using external wi-fi (at my office), but I cannot connect using the 3G network.  My ipsec.log stops exactly at the same place yours did: IPsec SA established.  The pppd-l2tp never starts past that.  It does when I connect successfully using wi-fi.

    It is possible Verizon is blocking L2TP ports on the 3G network?  UPD 4500?
    I would love to check this out but cannot find a port scanner that does UDP for a non-rooted phone.

    I have run Nmap on my laptop and verified UDP 4500 is open/filtered status using wi-fi and the 3G mobile hotspot from the phone.

    Got any ideas?
  • Thanks for your response, I bet Verizon is blocking it. I am using a Motorola Droid on Verizon. My Galaxy Tab immediately fails and that is on Sprint so I am sure that they are actively blocking VPNs. I will update my Astaro to 8.101 and then test it from a public wifi.
  • Also, I just tried my iPod touch configured to connect to the Astaro L2TP VPN through my Incredible's wi-fi hotspot.  Worked fine.  I was on my network with no problems.

    I hope the next version of Android has an SSL VPN client.
  • Hi, 
    FYI, there is an OpenSSL client for Android, but unfortunately you have to root the phone to use it.

    Barry
  • OK, It looks like the information in this thread confirms that Verizon is blocking ports needed to use L2TP VPN.

    According to the information you may remove your phone from the General IP restricted list and that should allow your VPN connections to go through.  I will probably try this instead of going through the process of rooting my phone and using the OpenSSL client.  The phone is owned by my employer.  If it was mine I probably would test the rooting waters.  Regardless,  this shows that Verizon is intentionally blocking ports that degrade features of the phones they sell.  Given,  these particular features are probably not used by most of the general consumers who purchase them, but we are consumers of a service/product bundle and should be allowed to use them unless they specifically stated that we could not when the product was purchased.

    Vpn through 3g problem? - Page 3 - Droid Forum - Verizon Droid & the Motorola Droid Forum

    Here is a recap of my all my Android VPN issues and testing:
    (HTC Incredible on Verizon in USA running Android 2.2)

    PPTP - will connect to Astaro for a short time then stops passing packets.  Does not disconnect, packets fail to transfer.  Was also tested on a Windows PPTP server with same result.  Research found there is a bug in the Android PPTP client since earlier versions and bug has not been a priority of Google to fix so it has so far been passed into version 2.2.

    L2TP over IPsec - Phone will not connect to Astaro.  It makes the IPsec connection, but L2TP not starting according to debug logs.  Appears that at least port UDP 4500 (and maybe others) are blocked by Verizon.  Phone will connect to Astaro using the same connection options over wi-fi just fine.  Research confirms other Verizon customers having problem and fixed it by having their phones removed from a "General IP restricted" block.

    I have tested using the phone as a 3G wi-fi hotspot for vpn connections with an Apple iPod touch and windows laptop.  Mixed results with VPN.  Open SSL client in windows seems to work very robustly, but have had PPTP and L2TP connections not work at some locations.  iPod touch L2TP client seems to work fine over hotspot to Astaro.

    Hope this helps - good luck.
    I am going to e-mail Verizon and see if I can remove my phone from the block list and will report back.
  • I tested by the following composition.

    ASG -- HUB -- Router(NAPT(IP masquerade)) -- Wifi -- Droid Phone

    The result is here. This is a result of 7.509. However the same log is output in V8.101.
    I think that ASG does the same behavior.
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/58/t/54118

    This Doroid Phone can be connected from 3G without trouble.
    At 3G, source port is 4500.
    In my test, Droid Phone that couldn't be connected by 3G uses ports other than 4500.

    When router is replaced with ASG and NAT is done, it is possible to connect it without trouble.
    The Windows client can be connected without trouble even by the above-mentioned composition(NAPT).
    However, not "RFC 3947" but "Draft-ietf-ipsec-nat-t-ike-02/03" is used by Windows client.

    I seem that there is a issue in the setting of not the career but Droid or ASG.
  • Hello,

    i have the same problem with my Samsung Galaxy SII. ASG is on 8.3...

    But its a little bit strange with same certificate/settings/GSM-card on my Samsung Galaxy Tab 10.1 L2TP works without problems.

    log with Galaxy tab:
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Plugin radius.so loaded.
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: RADIUS plugin initialized.
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Plugin radattr.so loaded.
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: RADATTR plugin initialized.
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Plugin ippool.so loaded.
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Plugin pppol2tp.so loaded.
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: pppd 2.4.5 started by (unknown), uid 0
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: using channel 18
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Using interface ppp1
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Connect: ppp1 
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Overriding mtu 1500 to 1380
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: PPPoL2TP options: lnsmode tid 27389 sid 18376 debugmask 0
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: Overriding mru 1500 to mtu value 1380
    2012:01:20-00:55:19 fw pppd-l2tp[20832]: sent [LCP ConfReq id=0x1    ]
    2012:01:20-00:55:20 fw pppd-l2tp[20832]: rcvd [LCP ConfReq id=0x1     ]
    2012:01:20-00:55:20 fw pppd-l2tp[20832]: sent [LCP ConfAck id=0x1     ]
    2012:01:20-00:55:22 fw pppd-l2tp[20832]: sent [LCP ConfReq id=0x1    ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [LCP ConfAck id=0x1    ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: Overriding mtu 1400 to 1380
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: PPPoL2TP options: lnsmode tid 27389 sid 18376 debugmask 0
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [CHAP Challenge id=0x95 , name = "fw.***.de"]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [CHAP Response id=0x95 , name = "***"]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: RADATTR plugin wrote 9 line(s) to file /var/run/radattr.ppp1.
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [CHAP Success id=0x95 "S=9F6D8D63DAE59CD4C381DA1BDDA8B563DF5F3C80"]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [IPCP ConfReq id=0x1 ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [CCP ConfReq id=0x1   ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: Unsupported protocol 'Compression Control Protocol' (0x80fd) received
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [IPCP ConfReq id=0x1    ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [IPCP ConfRej id=0x1 ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [IPCP ConfAck id=0x1 ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [IPCP ConfReq id=0x2   ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [IPCP ConfNak id=0x2   ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: rcvd [IPCP ConfReq id=0x3   ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: sent [IPCP ConfAck id=0x3   ]
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: Cannot determine ethernet address for proxy ARP
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: local  IP address xx.xx.3.1
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: remote IP address xx.xx.3.3
    2012:01:20-00:55:23 fw pppd-l2tp[20832]: Script /etc/ppp/ip-up started (pid 20837)
    2012:01:20-00:55:24 fw pppd-l2tp[20832]: Script /etc/ppp/ip-up finished (pid 20837), status = 0x0
    2012:01:20-00:55:24 fw pppd-l2tp[20832]: id="2201" severity="info" sys="SecureNet" sub="vpn" event="Connection started" username="xx" variant="l2tp" srcip="xx.xx.95.121" virtual_ip="xx.xx.3.3"

    Log SGSII:
    2012:01:20-01:11:19 fw pluto[9546]: packet from xx.xx.0.87:35: received Vendor ID payload [RFC 3947]
    2012:01:20-01:11:19 fw pluto[9546]: packet from xx.xx.0.87:35: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2012:01:20-01:11:19 fw pluto[9546]: packet from xx.xx.0.87:35: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2012:01:20-01:11:19 fw pluto[9546]: packet from xx.xx.0.87:35: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    2012:01:20-01:11:19 fw pluto[9546]: packet from xx.xx.0.87:35: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    2012:01:20-01:11:19 fw pluto[9546]: "S_REF_BJorkjyFHT_1"[145] xx.xx.0.87:35 #76004: responding to Main Mode from unknown peer xx.xx.0.87:35
    2012:01:20-01:11:19 fw pluto[9546]: "S_REF_BJorkjyFHT_1"[145] xx.xx.0.87:35 #76004: NAT-Traversal: Result using RFC 3947: peer is NATed
    2012:01:20-01:11:20 fw pluto[9546]: "S_REF_BJorkjyFHT_1"[145] xx.xx.0.87:35 #76004: Peer ID is ID_DER_ASN1_DN: 'C=de, L=xx, O=xx, CN=xx, E=xx'
    2012:01:20-01:11:20 fw pluto[9546]: "S_REF_BJorkjyFHT_1"[145] xx.xx.0.87:35 #76004: crl not found
    2012:01:20-01:11:20 fw pluto[9546]: "S_REF_BJorkjyFHT_1"[145] xx.xx.0.87:35 #76004: certificate status unknown
    2012:01:20-01:11:20 fw pluto[9546]: "D_REF_zxgjKBoxxj_111"[34] xx.xx.0.87:35 #76004: deleting connection "S_REF_BJorkjyFHT_1"[145] instance with peer xx.xx.0.87 {isakmp=#0/ipsec=#0}
    2012:01:20-01:11:20 fw pluto[9546]: "D_REF_zxgjKBoxxj_111"[34] xx.xx.0.87:35 #76004: we have a cert and are sending it
    2012:01:20-01:11:20 fw pluto[9546]: | NAT-T: new mapping xx.xx.0.87:35/18855)
    2012:01:20-01:11:20 fw pluto[9546]: "D_REF_zxgjKBoxxj_111"[34] xx.xx.0.87:18855 #76004: sent MR3, ISAKMP SA established
    2012:01:20-01:11:20 fw pluto[9546]: "D_REF_zxgjKBoxxj_111"[34] xx.xx.0.87:18855 #76004: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2012:01:20-01:11:20 fw pluto[9546]: "D_REF_aqRJTEnCTw_0"[29] xx.xx.0.87:18855 #76005: responding to Quick Mode
    2012:01:20-01:11:20 fw pluto[9546]: id="2201" severity="info" sys="SecureNet" sub="vpn" event="Connection started" username="C=de, L=xx, O=xx, CN=xx, E=xx" variant="ipsec" srcip="xx.xx.0.87" virtual_ip="xx.xx.0.87"
    2012:01:20-01:11:21 fw pluto[9546]: "D_REF_aqRJTEnCTw_0"[29] xx.xx.0.87:18855 #76005: IPsec SA established {ESP=>0x0d452da4 
  • I have problems to connect with L2TP over IPSec too. 

    I started trying with Froyo 2.2.2 on my phone, now I have CM7 (GB2.3.7) but the results are the same. 
    Every time I got the message "(perhaps this is a duplicated packet)". 
    But I don't understand what that means or where this comes from and how I should change some of the settings. 

    I have the same setup like ArunGupta mentioned on site 1. 

    Here is my error log: 
    L2TP-IPSec_PSK VPN-Connection from Milestone2 to ASG  

    Android 2.3.7 CM7  
    Kernel-Version 2.6.32.9 
    IP: 77.*.*.43 

    ASG 8.300 
    ASG-IP: 94.*.*.86 

    Live-Protokoll: IPsec-VPN: 

    • 2012:01:17-14:37:36 ASTARO pluto[6710]: packet from 77.*.*.43:500: received Vendor ID payload [RFC 3947]
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: packet from 77.*.*.43:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: packet from 77.*.*.43:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: packet from 77.*.*.43:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: packet from 77.*.*.43:500: ignoring Vendor ID payload [FRAGMENTATION 80000000]
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43 #5: responding to Main Mode from unknown peer 77.*.*.43
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43 #5: NAT-Traversal: Result using RFC 3947: i am NATed
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43 #5: Peer ID is ID_IPV4_ADDR: '77.*.*.43'
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: | NAT-T: new mapping 77.*.*.43:500/4500)
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: sent MR3, ISAKMP SA established
    • 2012:01:17-14:37:36 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    • 2012:01:17-14:37:37 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: cannot respond to IPsec SA request because no connection is known for 94.*.*.86/32===192.168.1.11:4500[192.168.1.11]:17/1701...77.*.*.43:4500[77.*.*.43]:17/%any
    • 2012:01:17-14:37:37 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: sending encrypted notification INVALID_ID_INFORMATION to 77.*.*.43:4500
    • 2012:01:17-14:37:48 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x96400bca (perhaps this is a duplicated packet)
    • 2012:01:17-14:37:48 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: sending encrypted notification INVALID_MESSAGE_ID to 77.*.*.43:4500
    • 2012:01:17-14:37:58 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x96400bca (perhaps this is a duplicated packet)
    • 2012:01:17-14:37:58 ASTARO pluto[6710]: "S_for Android_VPN"[7] 77.*.*.43:4500 #5: sending encrypted notification INVALID_MESSAGE_ID to 77.*.*.43:4500
     

    Maybe there is someone who can tell me what the problem is?! 
    Thanks in advance

    You can follow the analog thread here...