3

I'm using Debian Stretch, which is current testing release. Some time ago I set up a VPN connection using IPsec and it worked correctly. It suddenly stopped. It is possible that in the meantime some packages were upgraded (openssl or strongswan or other), but I'm not sure how to make it work again.

The error message is:

freyja@araguaney:~$ sudo ipsec up flow
initiating Main Mode IKE_SA flow[1] to XXX.XXX.XXX.XXX
generating ID_PROT request 0 [ SA V V V V ]
sending packet: from XXX.XXX.XXX.XXX[500] to XXX.XXX.XXX.XXX[500] (216 bytes)
received packet: from XXX.XXX.XXX.XXX[500] to XXX.XXX.XXX.XXX[500] (40 bytes)
parsed INFORMATIONAL_V1 request 1195290638 [ N(NO_PROP) ]
received NO_PROPOSAL_CHOSEN error notify
establishing connection 'flow' failed

It looks like my client is not able to use the algorithms proposed (hence NO_PROPOSAL_CHOSEN). I asked our admin for an error that appears in server logs and it says:

IKE: Main Mode Failed to match proposal: Transform: AES-128, SHA1, Group
2 (1024 bit) Reason: unsupported hash algorithm -1

He also listed the algorithms which server provides. I included ike parameter to force one of the possible combinations:

/etc/ipsec.conf:

conn flow
            ...
            leftfirewall=yes
            ike=aes128-sha1-modp1024
            ...

When I use it the connection log is longer but also ends with fail:.

...
reached self-signed root ca with a path length of 0
authentication of 'XXX.XXX.XXX.XXX' with RSA_EMSA_PKCS1_NULL successful
IKE_SA flow[1] established between XXX.XXX.XXX.XXX[O=csc..puejse, OU=users, CN=freyja]...XXX.XXX.XXX.XXX[XXX.XXX.XXX.XXX]
scheduling reauthentication in 3292s
maximum IKE_SA lifetime 3472s
generating TRANSACTION request 3626856411 [ HASH CPRQ(ADDR DNS) ]
sending packet: from XXX.XXX.XXX.XXX[4500] to XXX.XXX.XXX.XXX[4500] (76 bytes)
received packet: from XXX.XXX.XXX.XXX[4500] to XXX.XXX.XXX.XXX[4500] (92 bytes)
parsed TRANSACTION response 3626856411 [ HASH CPRP(ADDR DNS DNS) ]
installing DNS server XXX.XXX.XXX.XXX to /etc/resolv.conf
installing DNS server XXX.XXX.XXX.XXX to /etc/resolv.conf
installing new virtual IP XXX.XXX.XXX.XXX
generating QUICK_MODE request 2757640703 [ HASH SA No ID ID ]
sending packet: from XXX.XXX.XXX.XXX[4500] to XXX.XXX.XXX.XXX[4500] (204 bytes)
received packet: from XXX.XXX.XXX.XXX[4500] to XXX.XXX.XXX.XXX[4500] (252 bytes)
parsed INFORMATIONAL_V1 request 2437352460 [ HASH N(NO_PROP) ]
received NO_PROPOSAL_CHOSEN error notify
establishing connection 'flow' failed

Again, there is some information about hash function. I checked using ipsec listalgs that the hash functions proposed by the server are supported. So I don't know how to proceed with it.

I tried downgrading openssl, I removed current package (1.0.2h) and installed Ubuntu one (1.0.2.d -- the connection works for my colleague on his Ubuntu which uses this package). It didn't help.

I think that there is something wrong with my system SSL capabilities, because I also cannot negotiate with a mail server that used to work. But I don't know how to debug this and restore these capabilities. (These are all my wild guesses, because I'm not an advanced user). Please help.

3

The default proposals for IKE and ESP used by strongSwan have changed with 5.4.0.

For IKEv2 the IKE and ESP proposals are basically the same, only the order of the algorithms has changed. However, for IKEv1 only the first algorithm of each transform type of the default proposals is sent, which means SHA-1 is not proposed anymore.

So like you changed the IKE proposal with the ike setting you have to use a custom ESP proposal by specifying esp:

esp=aes128-sha1
  • I tried messing with esp setting also, but I guess I missed setting them both to the same value (I though they are interchangeable): ike=aes128-sha1-modp1024 \n esp=aes128-sha1-modp1024. Now it works. Thank you so much! – nuoritoveri May 12 '16 at 10:45
  • Adding a DH group to the ESP proposal will negotiate PFS (i.e. using separate keys for each ESP SA instead of deriving them from the IKE keys), both peers have to be configured the same for this to work. – ecdsa May 12 '16 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.