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

Help Please! IKE Phase-2 always fails (ASL 4.010)

Hello, I hope someone here can help me...

I have an ASL 4.010 system. I have gone though the creation of CA, CERTs and Connections per the latest X.509 Host to Net pdf guide on docs.astaro.org. 

I am using SSH Sentinel 1.4. After setting up the connection and verifying settings on both sides I try a diagnostics run of the connection.

IKE Phase-1 works fine. In live log I can see the key information from the remote user. IKE Phase-2 always fails. I have seen messages about not being able to pass IP or IPSEC packets but I cannot remember clearly what they were. 

Ideas?
  


This thread was automatically locked due to age.
  • Additional information:

    There are no NAT devices involved. I have a switch on the external network between the ASL and provider's router. I am using an IP address in the same network as the external interface of the ASL box.

    I have tried changing the destination of the link from external_net to internal_net and even PPTP_POOL. I have enabled and disabled NAT traversal (just to try things). I have also tried AUTO PACKET FILTER (ON/OFF) and adding the local subnet definition pointing to the internal network.

    IKE Phase-2 fails. I am confused (to say the least)  
  • a piece of the according logfile  might be helpful [;)]

    Greetings
    cyclops
      
  • Search the forums for Phase-2 IKE.  You have to assign an IP to the client for it to work.  It's detailed in a thread somewhere.  Cheers.
     
  • Subnets are the key! If the net or netmask is off you will get nowhere.
    I changed the destination subnet to my internal and then did the same setting on SSH Sentinel 1.4 and it work great. AES_PFS seems pretty fast too!

    Thanks!  
  • I spoke too soon!! The VPN connection works perfectly as long as I am not behind a NAT device remotely (hotel broadband, Linksys router at home, Airport 802.11b/g hotspot, etc). When behind a NAT device the IKE Phase-2 still fails.

    I have full control over the Linksys router at home. Here is my testing and the log files associated with the tests. When running through a NAT device the routing information gets longer and for some reason either side of the connection cannot handle it. See below for details.

    ==Definitions==
    192.168.1.101 - Intenal IP of remote laptop VPN client behind Linksys router
    76.26.5.60 - External IP of Linksys WRT54G router
    21.63.28.2 - IP of external interface on Astaro Linux box
    99.16.12.0/24 - Internal network of internal interface on Astaro Linux box
    Astaro - version 4.010
    SSH SentinelVPN Client  version 1.4.1
    Linksys WRT54G Router firmware version 1.30.7 dated July 8, 2003
    ========================

    Attempt #1 (Astaro NAT-T=Enabled/Linksys IPSEC Passthru=ON/SSH Sentinel NAT-T=ON) *TEST FAILS*

    Aug 28 19:00:20 (none) pluto[7957]:   Warning: empty directory 
    Aug 28 19:00:20 (none) pluto[7957]:   loaded my default X.509 cert file '/etc/x509cert.der' (907 bytes) 
    Aug 28 19:00:20 (none) pluto[7957]: listening for IKE messages 
    Aug 28 19:00:20 (none) pluto[7957]: loading secrets from "/etc/ipsec.secrets" 
    Aug 28 19:00:20 (none) pluto[7957]: no public interfaces found 
    Aug 28 19:00:43 (none) pluto[7957]:   Warning: empty directory 
    Aug 28 19:00:43 (none) pluto[7957]:   loaded cacert file 'Eljefes_Organization.pem' (1034 bytes) 
    Aug 28 19:00:43 (none) pluto[7957]:   loaded my default X.509 cert file '/etc/x509cert.der' (907 bytes) 
    Aug 28 19:00:43 (none) pluto[7957]:   loaded private key file '/etc/ipsec.d/private/WSI.pem' (963 bytes) 
    Aug 28 19:00:43 (none) pluto[7957]:   loaded private key file '/etc/ipsec.d/private/WSI.pem' (963 bytes) 
    Aug 28 19:00:43 (none) pluto[7957]: Changing to directory '/etc/ipsec.d/cacerts' 
    Aug 28 19:00:43 (none) pluto[7957]: Changing to directory '/etc/ipsec.d/crls' 
    Aug 28 19:00:43 (none) pluto[7957]: adding interface ipsec0/eth1 21.63.28.2 
    Aug 28 19:00:43 (none) pluto[7957]: adding interface ipsec0/eth1 21.63.28.2:4500 
    Aug 28 19:00:43 (none) pluto[7957]: forgetting secrets 
    Aug 28 19:00:43 (none) pluto[7957]: listening for IKE messages 
    Aug 28 19:00:43 (none) pluto[7957]: loading secrets from "/etc/ipsec.secrets" 
    Aug 28 19:00:43 (none) pluto[7957]: loading secrets from "/etc/ipsec.secrets" 
    Aug 28 19:00:43 (none) pluto[7957]: | from whack: got --esp=aes128-md5;modp1536 
    Aug 28 19:00:43 (none) pluto[7957]: | from whack: got --ike=3des-md5-modp1536 
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [SSH Sentinel 1.4.1]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [draft-stenberg-ipsec-nat-traversal-02]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [draft-stenberg-ipsec-nat-traversal-01]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
    Aug 28 19:05:01 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [XAUTH]
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_3"[3] 76.26.5.60 #3: responding to Main Mode from unknown peer 76.26.5.60
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_3"[3] 76.26.5.60 #3: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03: peer is NATed
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_3"[3] 76.26.5.60 #3: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_3"[3] 76.26.5.60 #3: Main mode peer ID is ID_USER_FQDN: 'eljefe@domain.tld'
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_3"[3] 76.26.5.60 #3: Issuer CRL not found
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_3"[3] 76.26.5.60 #3: Issuer CRL not found
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_2"[3] 76.26.5.60 #3: deleting connection "Warrior1_3" instance with peer 76.26.5.60
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_2"[3] 76.26.5.60 #3: deleting connection "Warrior1_2" instance with peer 76.26.5.60
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_2" #2: deleting state (STATE_MAIN_R3)
    Aug 28 19:05:01 (none) pluto[7957]: | NAT-T: new mapping 76.26.5.60:500/4500)
    Aug 28 19:05:01 (none) pluto[7957]: "Warrior1_2"[3] 76.26.5.60:4500 #3: sent MR3, ISAKMP SA established
    Aug 28 19:05:02 (none) pluto[7957]: "Warrior1_2"[3] 76.26.5.60:4500 #3: cannot respond to IPsec SA request because no connection is known for 99.16.12.0/24===21.63.28.2:4500...76.26.5.60:4500[eljefe@domain.tld]===192.168.1.101/32
    Aug 28 19:05:02 (none) pluto[7957]: "Warrior1_2"[3] 76.26.5.60:4500 #3: sending encrypted notification INVALID_ID_INFORMATION to 76.26.5.60:4500

    Attempt #2 (Astaro NAT-T=Enabled/Linksys IPSEC Passthru=ON/SSH Sentinel NAT-T=OFF) *TEST FAILS*

    Aug 28 19:00:43 (none) pluto[7957]:   loaded my default X.509 cert file '/etc/x509cert.der' (907 bytes) 
    Aug 28 19:00:43 (none) pluto[7957]:   loaded private key file '/etc/ipsec.d/private/WSI.pem' (963 bytes) 
    Aug 28 19:00:43 (none) pluto[7957]: Changing to directory '/etc/ipsec.d/cacerts' 
    Aug 28 19:00:43 (none) pluto[7957]: Changing to directory '/etc/ipsec.d/crls' 
    Aug 28 19:00:43 (none) pluto[7957]: added connection description "Warrior1_1" 
    Aug 28 19:00:43 (none) pluto[7957]: added connection description "Warrior1_2" 
    Aug 28 19:00:43 (none) pluto[7957]: added connection description "Warrior1_3" 
    Aug 28 19:00:43 (none) pluto[7957]: forgetting secrets 
    Aug 28 19:00:43 (none) pluto[7957]: loading secrets from "/etc/ipsec.secrets" 
    Aug 28 19:00:43 (none) pluto[7957]: | from whack: got --esp=aes128-md5;modp1536 
    Aug 28 19:00:43 (none) pluto[7957]: | from whack: got --esp=aes128-md5;modp1536 
    Aug 28 19:00:43 (none) pluto[7957]: | from whack: got --ike=3des-md5-modp1536 
    Aug 28 19:00:43 (none) pluto[7957]: | from whack: got --ike=3des-md5-modp1536 
    Aug 28 19:08:15 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [SSH Sentinel 1.4.1]
    Aug 28 19:08:15 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [XAUTH]
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_3"[4] 76.26.5.60 #4: responding to Main Mode from unknown peer 76.26.5.60
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_3"[4] 76.26.5.60 #4: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_3"[4] 76.26.5.60 #4: Main mode peer ID is ID_USER_FQDN: 'eljefe@domain.tld'
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_3"[4] 76.26.5.60 #4: Issuer CRL not found
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_3"[4] 76.26.5.60 #4: Issuer CRL not found
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #4: deleting connection "Warrior1_3" instance with peer 76.26.5.60
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #4: deleting connection "Warrior1_2" instance with peer 76.26.5.60
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_2" #3: deleting state (STATE_MAIN_R3)
    Aug 28 19:08:15 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #4: sent MR3, ISAKMP SA established
    Aug 28 19:08:16 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #4: cannot respond to IPsec SA request because no connection is known for 99.16.12.0/24===21.63.28.2...76.26.5.60[eljefe@domain.tld]===192.168.1.101/32
    Aug 28 19:08:16 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #4: sending encrypted notification INVALID_ID_INFORMATION to 76.26.5.60:500
    Aug 28 19:08:52 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [SSH Sentinel 1.4.1]
    Aug 28 19:08:52 (none) pluto[7957]: packet from 76.26.5.60:500: ignoring Vendor ID payload [XAUTH]
    Aug 28 19:08:52 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: responding to Main Mode from unknown peer 76.26.5.60
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: Main mode peer ID is ID_USER_FQDN: 'eljefe@domain.tld'
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: Issuer CRL not found
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: Issuer CRL not found
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: sent MR3, ISAKMP SA established
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: cannot respond to IPsec SA request because no connection is known for 99.16.12.0/24===21.63.28.2...76.26.5.60[eljefe@domain.tld]===192.168.1.101/32
    Aug 28 19:08:53 (none) pluto[7957]: "Warrior1_2"[4] 76.26.5.60 #5: sending encrypted notification INVALID_ID_INFORMATION to 76.26.5.60:500

    ===end of logs===

    I have also tried disabling IPSEC Passthru on the Linksys but then even IKE Phase-1 fails and the Astaro box never even sees an attempt to connect to port 500. I have also tried shutting off NAT-T on thr Astaro side as well but that fails too.

    When I am not behind a NAT device the VPN connection works great. When I am behind the Linksys the route is longer (the added IP of the laptop behind the Linksys) and it fails. The failure is exactly like when I had the route configured wrong. I cannot decipher how it needs to be configured in this case. 

    Any suggestions or comments would be greatly appreciated!!!!   
  • ElJefe,

    [ QUOTE ]

    Aug 28 19:05:02 (none) pluto[7957]: "Warrior1_2"[3] 76.26.5.60:4500 #3: cannot respond to IPsec SA request because no connection is known for 99.16.12.0/24===21.63.28.2:4500...76.26.5.60:4500[eljefe@domain.tld]===192.168.1.101/32


    [/ QUOTE ]

    The VPN connection is configured as roadwarrior and receives a gateway and a host address, 21.63.28.2:4500...76.26.5.60:4500 (and virtual IP???). This indicates either that your router does IPSec passthrough or the settings on the client are not correct. First case disable the passthrough feature on the router. The firewall needs to be configured with NAT-T and you should use virtual IP addresses which can be configured in the remote key section. 

    Greetings
    cyclops

      
  • Cyclops,

    I tried disabling passthough on the router and when I did that IKE Phase-1 fails. With passthough enabled I pass IKE Phase-1 perfectly but Phase-2 fails due to the routing shown in the logs I posted.

    I can try the virtual IP. Question is what and where. Would I make the virtual IP be something in the router's address space (192.168.1.xxx/32) meaning on the internal network behind the linksys router? A virutal IP matching the internal network behind the Astaro firewall?

    There are also two places I can define a virtual IP. In SSH Sentinel v1.4 ->Vpn Connections->Properties->Acquire Virtual IP address [modes; DHCP over IPSEC, L2TP, IKE Config Mode, specify manually]. Also it can be configured in the local connections definition on Astaro.

    The log output shows the routing path but it doesn't give me any idea of which stop along the way lacks the proper definition to get the packets from end to end.

    Thanks for your reply!

    El Jefe  
  • Acquire virtual IP in SSH Sentinel should be on.

    In ASL, assign a virtual IP to the users certificate.
    This will then be given to the client. 
  • Simon, Thank you for the suggestion. I have four method options in SSH Sentinel under "Acquire virtual IP address". They are:

    DHCP over IPSec, from what I have read ASL does not support this *yet*
    L2TP (Layer two tunneling)
    IKE Config Mode
    Manual

    I am assuming IKE Config as it looks most similar to specifying a virtual IP in the user's certificate. Ami I correct in my assumption?

    Thanks again!

    El Jefe  
  • I'm feeling like I understand this vpn less and less as I go. I tested and the only virtual IP setting that worked was manual mode. I entered the same manual IP setting as I configured into the VPN connection key on the ASL side. In doing so the VPN passed SSH's diagnostics and connected. From there I could not use the tunnel. I think I used a bad setting for the virtual IP.

    My question is what IP should be used for the virtual IP setting? Should it be a legit IP address that is a part of the internal network behind the ASL firewall? Should it be an unassociated private IP address such as 10.0.1.X or 192.168.1.X? When I specify the virtual IP on the Sentinel side should I list it as the IP with a mask of 24 or the IP with a mask of /32?

    Going by the IP addresses in the logs posted earlier in this thread, which address should I be using for the virtual IP address?

    99.16.12.0/24===21.63.28.2:4500...76.26.5.60:4500[eljefe@domain.tld]===192.168.1.101/32

    ==Definitions==
    192.168.1.101 - Intenal IP of remote laptop VPN client behind Linksys router
    76.26.5.60 - External IP of Linksys WRT54G router
    21.63.28.2 - IP of external interface on Astaro Linux box
    99.16.12.0/24 - Internal network of internal interface on Astaro Linux box
    Astaro - version 4.010
    SSH SentinelVPN Client version 1.4.1
    Linksys WRT54G Router firmware version 1.30.7 dated July 8, 2003
    ========================