[strongSwan] strongswan-5.1.1 with 4.xx, tunnel pb
Thomas Egerer
hakke_007 at gmx.de
Tue Jan 7 00:54:16 CET 2014
On 01/05/2014 10:50 PM, s s wrote:
> Hello,
>
> I made some homework and found out different elements, which may help to troubleshoot.
>
>>> This packet was a large packet and was sent as two UDP fragments.
> What looked like to be a packet fragmentation, in fact appeared to be two different CAs sent in the key exchange.
> I had 2 CAs in the "cacert" folder due to the coming expiration of one of them. So I removed the expired one and the packet duplication was solved.
>
> Now comes to the other issues, which I am unable to resolve.
> I tried to switch to the IKE v1.
>
> The initial authentication is successful:
> root at bt:/etc/ipsec.d# ipsec up karmaIKE2
> initiating IKE_SA karmaIKE2[4] to 192.168.4.10
> generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
> sending packet: from 10.0.2.15[500] to 192.168.4.10[500]
> received packet: from 192.168.4.10[500] to 10.0.2.15[500]
> parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ N(MULT_AUTH) ]
> local host is behind NAT, sending keep alives
> authentication of 'btvm at hmnet.ucp' (myself) with RSA signature successful
>
>
> establishing CHILD_SA karmaIKE2 <<-- this step fails
> generating IKE_AUTH request 1 [ IDi CERT CERTREQ IDr AUTH SA TSi TSr N(MOBIKE_SUP) N(NO_ADD_ADDR) N(MULT_AUTH) ]
> sending packet: from 10.0.2.15[4500] to 192.168.4.10[4500]
> retransmit 1 of request with message ID 1
> sending packet: from 10.0.2.15[4500] to 192.168.4.10[4500]
>
>
> Examining the other side logs gives:
> Jan 5 18:30:45 karma charon: 04[CFG] received proposals: ESP:AES_CBC_128/HMAC_SHA1_96/MODP_2048/NO_EXT_SEQ,
> ESP:3DES_CBC/HMAC_SHA1_96/MODP_2048/NO_EXT_SEQ
> Jan 5 18:30:45 karma charon: 04[CFG] configured proposals: ESP:AES_CBC_128/HMAC_SHA1_96/NO_EXT_SEQ,
> ESP:3DES_CBC/HMAC_SHA1_96/NO_EXT_SEQ,
> ESP:AES_CBC_128/AES_CBC_192/AES_CBC_256/3DES_CBC/BLOWFISH_CBC_256/HMAC_SHA1_96/AES_XCBC_96/HMAC_MD5_96/NO_EXT_SEQ
> Jan 5 18:30:45 karma charon: 04[IKE] no matching proposal found, sending NO_PROPOSAL_CHOSEN
Hi Serge,
since you have not added an 'esp=encryption-integrity[-dhgroup][-esnmode]'
line to your ipsec.conf, both daemons fall back to their default proposals
(for both IKE and IPSec). For IKE they find a match, for IPSec (in this
case ESP) however, they cannot find a matching proposal and the CHILD_SA
setup fails. The syslog tells it quite clearly: it first lists the received
proposals then the configured ones, and usually a selected one, or in your
case the error.
You will have to add a line to your ipsec.conf which tells charon which
ESP proposal to use*:
<snip>
conn karmaIKE2
left=%defaultroute
leftsubnet=10.0.2.0/24
leftcert=lnvo.hostCert.pem
right=192.168.4.10
rightsubnet=0.0.0.0/0
rightcert=peercerts/karmaY2034.hostCert.pem
keyexchange=ikev2
+ esp=aes128-sha1-modp2048!
mobike=yes
auto=add
<snap>
*preferrably on both sides.
If you ommit the exclamation mark, the default proposals for ESP will also
be included (you may not want that). Also the 'pfs = no' has no effect with
IKEv2, it's IKEv1 only. Disabling PFS for CHILD_SAS is done in IKEv2 by
ommiting the dh-group from the proposal string.
You can find all the info in the man page [1].
I am however still wondering why your initiating 4.3.2 box proposes
algorithms that are different from the default ones.
Hope this helps.
Cheeers,
Thomas
[1] http://linux.die.net/man/5/strongswan_ipsec.conf
More information about the Users
mailing list