<div dir="ltr"><div><br></div><div>Hello,</div><div><br></div><div>I would like to do "VPN server for remote clients using IKEv2" [0] for multiple clients, but with fixed client IPs. Currently I set the "rightsubnet=<a href="http://0.0.0.0/0">0.0.0.0/0</a>", but I would prefer to be able to specify a different rightsubnet for each client, is this possible?</div><div><br></div><div>I tried with the configurations below, and get this error in the pluto.log:</div><div><br></div><div>    Mar 31 03:52:48.471606: "vpn_server_tunnel"[2] 10.10.16.6 #6: cannot route -- route already in use for "vpn_server_tunnel"[1] 10.10.15.5<br></div><div><br></div><div>VPN server config:</div><div><br></div><div>conn vpn_server_tunnel<br>    left=10.10.8.8<br>    leftid=@<a href="http://vpnserver08.lab.com">vpnserver08.lab.com</a><br>    leftsubnet=<a href="http://10.10.10.0/24">10.10.10.0/24</a><br>    leftrsasigkey=%cert<br>    leftcert=<a href="http://vpnserver08.lab.com">vpnserver08.lab.com</a><br>    leftsendcert=always<br><br>    right=%any<br>    rightrsasigkey=%cert<br>    rightid=%fromcert<br>    rightca=%same<br>    rightsubnet=<a href="http://0.0.0.0/0">0.0.0.0/0</a><br><br>    dpddelay=30<br>    dpdtimeout=120<br>    dpdaction=clear<br>    auto=add<br>    ikev2=insist<br>    rekey=no<br>    fragmentation=yes<br>    ike=aes256-sha2<br>    esp=aes256-sha2_512-dh14<br>    authby=rsa-sha2_512<br>    ikelifetime=86400s<br>    salifetime=3600s<br></div><div><br></div><div>First client config:</div><div><br></div><div>conn vpn_client_tunnel<br>    left=10.10.8.8<br>    leftid=@<a href="http://vpnserver08.lab.com">vpnserver08.lab.com</a><br>    leftsubnet=<a href="http://10.10.10.0/24">10.10.10.0/24</a><br>    leftrsasigkey=%cert<br>    leftmodecfgclient=yes<br><br>    right=10.10.15.5<br>    rightrsasigkey=%cert<br>    rightid=%fromcert<br>    rightsubnet=<a href="http://0.0.0.0/0">0.0.0.0/0</a><br>    rightcert=<a href="http://vpnclientha05.lab.com">vpnclientha05.lab.com</a><br><br>    narrowing=yes<br>    ikev2=insist<br>    rekey=yes<br>    fragmentation=yes<br>    mobike=yes<br>    auto=start<br>    ike=aes256-sha2<br>    esp=aes256-sha2_512-dh14<br>    authby=rsa-sha2_512<br>    ikelifetime=86400s<br>    salifetime=3600s<br></div><div><br></div><div>Second client config (same, just showing differences)</div><div><br></div><div>conn vpn_client_tunnel<br></div><div>    right=10.10.16.6<br>    rightcert=<a href="http://vpnclientha06.lab.com">vpnclientha06.lab.com</a><br></div><div><br></div><div>Complete log for 2nd client connection attempt:</div><div><br></div><div>Mar 31 03:52:48.411778: "vpn_server_tunnel"[2] <a href="http://10.10.16.6">10.10.16.6</a>: local IKE proposals (IKE SA responder matching remote proposals):<br>Mar 31 03:52:48.411818: "vpn_server_tunnel"[2] <a href="http://10.10.16.6">10.10.16.6</a>:   1:IKE=AES_CBC_256-HMAC_SHA2_256-HMAC_SHA2_256_128-MODP2048+MODP3072+MODP4096+MODP8192+ECP_256+ECP_384+ECP_521+CURVE25519<br>Mar 31 03:52:48.411832: "vpn_server_tunnel"[2] 10.10.16.6 #4: proposal 1:IKE=AES_CBC_256-HMAC_SHA2_256-HMAC_SHA2_256_128-MODP2048 chosen from remote proposals 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048;DH=MODP3072;DH=MODP4096;DH=MODP8192;DH=ECP_256;DH=ECP_384;DH=ECP_521;DH=CURVE25519[first-match]<br>Mar 31 03:52:48.413657: "vpn_server_tunnel"[2] 10.10.16.6 #4: sent IKE_SA_INIT reply {auth=IKEv2 cipher=AES_CBC_256 integ=HMAC_SHA2_256_128 prf=HMAC_SHA2_256 group=MODP2048}<br>Mar 31 03:52:48.442285: "vpn_server_tunnel"[2] 10.10.16.6 #5: proposal 1:IKE=AES_CBC_256-HMAC_SHA2_256-HMAC_SHA2_256_128-MODP2048 chosen from remote proposals 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048;DH=MODP3072;DH=MODP4096;DH=MODP8192;DH=ECP_256;DH=ECP_384;DH=ECP_521;DH=CURVE25519[first-match]<br>Mar 31 03:52:48.444040: "vpn_server_tunnel"[2] 10.10.16.6 #5: sent IKE_SA_INIT reply {auth=IKEv2 cipher=AES_CBC_256 integ=HMAC_SHA2_256_128 prf=HMAC_SHA2_256 group=MODP2048}<br>Mar 31 03:52:48.459749: "vpn_server_tunnel"[2] 10.10.16.6 #5: processing decrypted IKE_AUTH request: SK{IDi,CERT,IDr,AUTH,SA,TSi,TSr,N}<br>Mar 31 03:52:48.461220: "vpn_server_tunnel"[2] 10.10.16.6 #5: authenticated using RSA with SHA2_512 and peer certificate 'CN=<a href="http://vpnclientha06.lab.com">vpnclientha06.lab.com</a>, O=LAB' issued by CA 'CN=LAB CA, O=LAB'<br>Mar 31 03:52:48.471425: "vpn_server_tunnel"[2] <a href="http://10.10.16.6">10.10.16.6</a>: local ESP/AH proposals (IKE_AUTH responder matching remote ESP/AH proposals):<br>Mar 31 03:52:48.471445: "vpn_server_tunnel"[2] <a href="http://10.10.16.6">10.10.16.6</a>:   1:ESP=AES_CBC_256-HMAC_SHA2_512_256-NONE-DISABLED<br>Mar 31 03:52:48.471454: "vpn_server_tunnel"[2] 10.10.16.6 #6: proposal 1:ESP=AES_CBC_256-HMAC_SHA2_512_256-DISABLED SPI=26149080 chosen from remote proposals 1:ESP:ENCR=AES_CBC_256;INTEG=HMAC_SHA2_512_256;ESN=DISABLED[first-match]<br>Mar 31 03:52:48.471606: "vpn_server_tunnel"[2] 10.10.16.6 #6: cannot route -- route already in use for "vpn_server_tunnel"[1] 10.10.15.5<br>Mar 31 03:52:48.471648: "vpn_server_tunnel"[2] 10.10.16.6 #6: encountered fatal error in state STATE_V2_IKE_AUTH_CHILD_R0<br>Mar 31 03:52:48.471680: "vpn_server_tunnel"[2] 10.10.16.6 #5: deleting other state #6 (STATE_V2_IKE_AUTH_CHILD_R0) aged 0.00027s and NOT sending notification<br>Mar 31 03:52:48.471719: "vpn_server_tunnel"[2] 10.10.16.6 #6: ERROR: netlink response for Del SA <a href="mailto:esp.26149080@10.10.16.6">esp.26149080@10.10.16.6</a> included errno 3: No such process<br>Mar 31 03:52:48.471795: "vpn_server_tunnel"[2] 10.10.16.6 #5: deleting state (STATE_V2_ESTABLISHED_IKE_SA) aged 0.029566s and NOT sending notification<br>Mar 31 03:52:48.471719: "vpn_server_tunnel"[2] 10.10.16.6 #6: ERROR: netlink response for Del SA <a href="mailto:esp.26149080@10.10.16.6">esp.26149080@10.10.16.6</a> included errno 3: No such process<br>Mar 31 03:52:48.471795: "vpn_server_tunnel"[2] 10.10.16.6 #5: deleting state (STATE_V2_ESTABLISHED_IKE_SA) aged 0.029566s and NOT sending notification<br></div><div><br></div><div>[0] <a href="https://libreswan.org/wiki/VPN_server_for_remote_clients_using_IKEv2">https://libreswan.org/wiki/VPN_server_for_remote_clients_using_IKEv2</a></div><div><br></div><div>Regards,</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Brady Johnson</b><div>Principal Software Engineer</div><div><div>Telco Solutions & Enablement</div></div><div><a href="mailto:brady.johnson@redhat.com" target="_blank">brady.johnson@redhat.com</a><br></div><div><div><br></div><div></div></div></div></div></div></div>