I'm trying to setup a IPSec tunnel between two LXC Debian Jessie on the same physical server (Debian as well). Here is my network topology :
172.17.23.0/24 ---- 172.17.23.100 - VPN1 - 10.73.52.1 ==== 10.73.53.2 - VPN2 - 192.168.100.100 ---- 192.168.100.0/24
The configuration on VPN1 and VPN2 is the same, I'm authenticating with Pre-Shared-Key :
/etc/ipsec.conf config setup charondebug="all" uniqueids=yes
conn %default
conn testconn
left=10.73.53.1
leftsubnet=172.17.23.0/24
right=10.73.53.2
rightsubnet=192.168.100.0/24
ike=aes128-sha1-modp1024
esp=aes128-sha1
keyingtries=0
ikelifetime=60m
auto=start
closeaction=restart
keylife=20m
rekeymargin=3m
keyexchange=ike
mobike=no
authby=secret
type=tunnel
/etc/ipsec.secrets 10.73.53.1 10.73.53.2 : PSK "PasswordHere"
I startup both sides ipsec start
and up text
connection ipsec up
root@vpn1:~# ipsec up testconn
initiating IKE_SA testconn[3] to 10.73.53.2
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
sending packet: from 10.73.53.1[500] to 10.73.53.2[500] (304 bytes)
received packet: from 10.73.53.2[500] to 10.73.53.1[500] (36 bytes)
parsed IKE_SA_INIT response 0 [ N(NO_PROP) ]
received NO_PROPOSAL_CHOSEN notify error
establishing connection 'testconn' failed
Idem pour vpn2.
I got similar messages in syslog.
I don't understand why I get this NO_PROPOSAL_CHOSEN
, as I'm trying to force the choice of algorithms to be used in the /etc/ipsec.conf
file !
Many thanks for your help, don't hesitate to ask for more informations.
EDIT : Here is extract from /var/log/syslog from VPN2 (receiving connection) :
vpn2 charon: 07[NET] sending packet: from 10.73.53.2[500] to 10.73.53.1[500] (940 bytes)
vpn2 charon: 09[NET] received packet: from 10.73.53.1[500] to 10.73.53.2[500] (36 bytes)
vpn2 charon: 09[ENC] parsed IKE_SA_INIT response 0 [ N(NO_PROP) ]
vpn2 charon: 09[IKE] received NO_PROPOSAL_CHOSEN notify error
vpn2 charon: 10[NET] received packet: from 10.73.53.254[500] to 10.73.53.2[500] (940 bytes)
vpn2 charon: 10[ENC] parsed IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
vpn2 charon: 10[IKE] no IKE config found for 10.73.53.2...10.73.53.254, sending NO_PROPOSAL_CHOSEN
I got this no IKE config found
, googling does not help much :/
EDIT2 : Here is the output of ipsec statusall
:
root@vpn1:~# ipsec statusall
Status of IKE charon daemon (strongSwan 5.2.1, Linux 3.16.0-4-amd64, x86_64):
uptime: 46 minutes, since Dec 15 14:56:02 2017
malloc: sbrk 2408448, mmap 0, used 310128, free 2098320
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 0
loaded plugins: charon aes rc2 sha1 sha2 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl fips-prf gmp agent xcbc hmac gcm attr kernel-netlink resolve socket-default stroke updown
Listening IP addresses:
172.17.23.10
10.73.53.1
Connections:
test: 10.73.53.1...10.73.53.2 IKEv1/2
test: local: [10.73.53.1] uses pre-shared key authentication
test: remote: [10.73.53.2] uses pre-shared key authentication
test: child: 172.17.23.0/24 === 192.168.100.0/24 TUNNEL
Security Associations (0 up, 0 connecting):
none
root@vpn1:~#
I have exactly the same on server VPN2 (except 172.17.23.0/24 is changed for 192.168.100.0/24, which is local subnet on VPN2 side).
It's not matching the connection attempt to a configuration on your strongswan server.
What's the output if you run 'ipsec statusall'? The command may be 'strongswan statusall' - seems to differ per distro, that'll show what configurations you have loaded