Ubuntu 20.04 Strongswan 5.9.1 (built from source)
swanctl.conf
Android Strongswan app
I am using a self signed ca and certificates.
roadwarr-ikev2-pubkey {
version = 2
#proposals = aes192gcm16-aes128gcm16-prfsha256-ecp256-ecp521,aes192-sha256-modp3072,default
proposals = aes256-sha1-modp1024,default
rekey_time = 0s
pools = primary-pool-ipv4
fragmentation = yes
dpd_delay = 30s
local_addrs = %any
# dpd_timeout doesn't do anything for IKEv2. The general IKEv2 packet timeouts are used.
local-1 {
#auth = pubkey
certs = Srv1SwanCert.der
id = ub-srv-1
}
remote-1 {
# defaults are fine.
#auth = pubkey
#id = androidLkP
id = %any
}
children {
roadwarr-ikev2-pubkey {
# local_ts = 10.10.5.0/24
local_ts = 0.0.0.0/0
rekey_time = 0s
dpd_action = clear
# esp_proposals = aes192gcm16-aes128gcm16-prfsha256-ecp256-modp3072,aes192-sha256-ecp256-modp3072,default
esp_proposals = aes256-sha1-modp1024,default
}
}
}
This setup works only if in Android app "Client identity" is blank. As soon as I add a client id, I get this:
15[CFG] selected peer config 'roadwarr-ikev2-pubkey'
15[IKE] no trusted RSA public key found for 'androidLkP'
androidLkP is a CN in this particular certificate.
I have extracted a public key from a certificate by using pki command, placed it into /etc/swanctl/pubkey
folder.
My goal is to have separate configurations for specific clients and not using id = %any
pubkey plugin is loaded.
What could cause this problem?
Does it work with a self signed ca or it requires a real trusted CA?