HI There,
I have been trying to establish an ipsec link with certificates between a linux libreswan system on ubuntu:
The ubuntu side shows the link as being up:
ipsec whack --trafficstatus
006 #326: “vpntest-vpn/1x1”[1] 92.99.99.99, type=ESP, add_time=0, inBytes=0, outBytes=0, maxBytes=2^63B, id=‘adminXRUTX50XXX’
But on the RUTX50
ipsec statusall
Status of IKE charon daemon (strongSwan 5.9.2, Linux 5.4.229, armv7l):
uptime: 13 minutes, since Feb 13 17:28:35 2024
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 0
loaded plugins: charon aes des sha2 sha1 md4 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs8 pgp pem openssl gmp xcbc hmac kernel-netlink socket-default stroke vici updown eap-identity eap-mschapv2 xauth-generic
Virtual IP pools (size/online/offline):
172.31.32.120/32: 1/0/0
Listening IP addresses:
192.168.1.1
fd6e:31f6:d0c4::1
10.136.230.89
Connections:
AWS-AWS_c: %any…XX.XX.XX.XX IKEv2, dpddelay=30s
AWS-AWS_c: local: [C=GB, ST=Middlesex, L=XXXX, O=XXXXX, OU=IPSEC CLIENT, CN=adminXRUTX50.XXX_co.uk, E=supportXXXX_co.uk] uses public key authentication
AWS-AWS_c: cert: “C=GB, ST=Middlesex, L=XXXX, O=XXXXX, OU=IPSEC CLIENT, CN=adminXRUTX50.XXX_co.uk, E=supportXXXX_co.uk”
AWS-AWS_c: remote: [C=GB, ST=Middlesex, L=XXXX, O=XXXXX, OU=IPSEC SERVER, CN=ip-172-31-32-120.XXXXX_com, E=supportXXXX_co.uk] uses public key authentication
AWS-AWS_c: cert: “C=GB, ST=Middlesex, L=XXXX, O=XXXXX, OU=IPSEC SERVER, CN=ip-172-31-32-120.XXXXX_com, E=supportXXXX_co.uk”
AWS-AWS_c: child: 192.168.1.0/24 === 172.31.32.0/20 TUNNEL, dpdaction=restart
Security Associations (0 up, 0 connecting):
none
The log shows:
Tue Feb 13 17:33:14 2024 daemon.info ipsec: 10[IKE] received end entity cert “C=GB, ST=Middlesex, L=XXXX, O=XXXXX, OU=IPSEC SERVER, CN=ip-172-31-32-120.XXX_com, E=supportXXXX_co.uk”
Tue Feb 13 17:33:14 2024 daemon.info ipsec: 10[IKE] no trusted RSA public key found for ‘CN=ip-172-31-32-120.XXX_com’
Tue Feb 13 17:33:14 2024 daemon.info ipsec: 10[ENC] generating INFORMATIONAL request 2 [ N(AUTH_FAILED) ]
So I have used just the CN as the remote Identity. If Strongswan requires the ID to be the full cert then GUI interface restricts the number of characters I can use. The only copy of the ipsec.conf that I can find from the CLI resides under /var/ipsec but this is overwritten with an ipsec restart
ip xfrm pol hows now kernel route either:
ip xfrm pol
src 0.0.0.0/0 dst 0.0.0.0/0
socket in priority 0
src 0.0.0.0/0 dst 0.0.0.0/0
socket out priority 0
src 0.0.0.0/0 dst 0.0.0.0/0
socket in priority 0
src 0.0.0.0/0 dst 0.0.0.0/0
socket out priority 0
src ::/0 dst ::/0
socket in priority 0
src ::/0 dst ::/0
socket out priority 0
src ::/0 dst ::/0
socket in priority 0
src ::/0 dst ::/0
socket out priority 0
Could you please advise on how I can resolve this issue?
Thanks
Dek