<div dir="ltr"><div><div><div><div>Hi Andreas,<br><br></div>Now i have added CA:TRUE for intermediate certs<br><br>10.206.1.10<br>[root@localhost private]# ipsec listcacerts<br><br>List of X.509 CA Certificates:<br><br> subject: "CN=DaRoot"<br>
issuer: "CN=DaRoot"<br> serial: b6:1b:fb:f4:96:05:f7:18<br> validity: not before Mar 06 18:01:38 2014, ok<br> not after Apr 05 18:01:38 2014, ok (expires in 29 days)<br> pubkey: RSA 1024 bits<br>
keyid: eb:12:9a:05:72:2b:bf:89:f0:49:91:47:f7:bf:c1:85:9b:0f:66:e8<br> subjkey: 55:90:f7:42:41:91:73:a1:fb:84:b8:91:8a:2e:32:44:73:97:f9:10<br> authkey: 55:90:f7:42:41:91:73:a1:fb:84:b8:91:8a:2e:32:44:73:97:f9:10<br>
<br> subject: "CN=Zintermediate"<br> issuer: "CN=DaRoot"<br> serial: 02:46:a7:72<br> validity: not before Mar 06 18:05:34 2014, ok<br> not after Mar 26 18:05:34 2014, ok (expires in 19 days)<br>
pubkey: RSA 1024 bits<br> keyid: c2:ba:fb:bd:36:0b:bd:32:e7:8e:0c:b9:25:82:59:64:6a:f8:b7:46<br> subjkey: f0:2a:8a:a7:55:7f:1b:44:ef:c4:18:00:79:c1:d8:7b:be:98:00:cd<br><br><br>10.206.1.11<br>[root@localhost sriram_ikeauth]# ipsec listcacerts<br>
<br>List of X.509 CA Certificates:<br><br> subject: "CN=Zintermediate1"<br> issuer: "CN=DaRoot"<br> serial: 02:46:a7:73<br> validity: not before Mar 06 18:09:23 2014, ok<br> not after Mar 26 18:09:23 2014, ok (expires in 19 days)<br>
pubkey: RSA 1024 bits<br> keyid: ea:d5:28:42:7e:74:f3:47:53:51:5e:28:be:27:ed:8f:2c:dc:05:eb<br> subjkey: ee:3d:fe:ab:11:d4:d9:3c:a2:3c:95:cb:42:04:d8:0e:12:35:36:76<br><br> subject: "CN=DaRoot"<br>
issuer: "CN=DaRoot"<br> serial: b6:1b:fb:f4:96:05:f7:18<br> validity: not before Mar 06 18:01:38 2014, ok<br> not after Apr 05 18:01:38 2014, ok (expires in 29 days)<br> pubkey: RSA 1024 bits<br>
keyid: eb:12:9a:05:72:2b:bf:89:f0:49:91:47:f7:bf:c1:85:9b:0f:66:e8<br> subjkey: 55:90:f7:42:41:91:73:a1:fb:84:b8:91:8a:2e:32:44:73:97:f9:10<br> authkey: 55:90:f7:42:41:91:73:a1:fb:84:b8:91:8a:2e:32:44:73:97:f9:10<br>
<br></div>But ipsec tunnel is not getting established<br></div>In 10.206.1.10 I am getting the below errors.<br><br>[root@localhost private]# ipsec up home<br>initiating IKE_SA home[2] to 10.206.1.11<br>generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]<br>
sending packet: from 10.206.1.10[500] to 10.206.1.11[500] (268 bytes)<br>received packet: from 10.206.1.11[500] to 10.206.1.10[500] (321 bytes)<br>parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ N(MULT_AUTH) ]<br>
received cert request for "CN=DaRoot"<br>received 1 cert requests for an unknown ca<br>sending cert request for "CN=DaRoot"<br>sending cert request for "CN=Zintermediate"<br>authentication of 'CN=ten' (myself) with pre-shared key<br>
no shared key found for 'CN=ten' - 'CN=eleven'<br>establishing connection 'home' failed<br><br></div>I have used the below set of commands to generate the certificates of root CA, SubCA's and End Entities.<br>
<br>
<p class="MsoNormal">Root ca cert creation</p>
<p class="MsoNormal">openssl req -new -x509 -nodes -out ca.crt -keyout ca.key -subj
/CN=DaRoot -newkey rsa:1024 -sha512</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Intermediate CA cert creation signed by RootCA</p>
<p class="MsoNormal">openssl req -new -nodes -out ca-int.req -keyout ca-int.key
-subj /CN=Zintermediate -newkey rsa:1024 -sha512</p>
<p class="MsoNormal">openssl x509 -req -in ca-int.req -CAkey ca.key -CA ca.crt
-days 20 -set_serial 38184818 -sha512 -out ca-int.crt -extfile
../sriram_chaincert1/file.prm</p>
<p class="MsoNormal">[root@localhost sriram_chaincert2]# cat
../sriram_chaincert1/file.prm</p>
<p class="MsoNormal">basicConstraints=CA:TRUE</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Intermediate1 CA cert creation signed by RootCA</p>
<p class="MsoNormal">openssl req -new -nodes -out ca-int1.req -keyout ca-int1.key
-subj /CN=Zintermediate1 -newkey rsa:1024 -sha512</p>
<p class="MsoNormal">openssl x509 -req -in ca-int1.req -CAkey ca.key -CA ca.crt
-days 20 -set_serial 38184819 -sha512 -out ca-int1.crt -extfile
../sriram_chaincert1/file.prm</p>
<p class="MsoNormal">[root@localhost sriram_chaincert2]# cat
../sriram_chaincert1/file.prm</p>
<p class="MsoNormal">basicConstraints=CA:TRUE</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">End Entity cert creation signed by intermediate CA </p>
<p class="MsoNormal">openssl req -new -out ten.req -keyout ten.key -nodes -newkey
rsa:1024 -subj /CN=ten</p>
<p class="MsoNormal">openssl x509 -req -in ten.req -CAkey ca-int.key -CA
ca-int.crt -days 10 -set_serial 38184820 -sha512 -out ten.crt</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">End Entity1 cert creation signed by Intermediate1 CA</p>
<p class="MsoNormal">openssl req -new -out eleven.req -keyout eleven.key -nodes
-newkey rsa:1024 -subj /CN=eleven</p>
<p class="MsoNormal">openssl x509 -req -in eleven.req -CAkey ca-int1.key -CA
ca-int1.crt -days 10 -set_serial 38184821 -sha512 -out eleven.crt</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Please let me know how to resolve this issue.</p><p class="MsoNormal"><br></p><p class="MsoNormal">Regards,</p><p class="MsoNormal">Sriram.<br></p><p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<br><div><div><br><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 8:11 PM, Sriram <span dir="ltr"><<a href="mailto:sriram.ec@gmail.com" target="_blank">sriram.ec@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks Andreas, Let me check that and get back to you.<br><br></div>Regards,<br>Sriram.<br></div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 7:38 PM, Andreas Steffen <span dir="ltr"><<a href="mailto:andreas.steffen@strongswan.org" target="_blank">andreas.steffen@strongswan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Siram,<br>
<br>
in order for an Intermediate CA certificate to be accepted by<br>
strongSwan, the CA basic constraint in the certificate has<br>
to be set to TRUE. So if you execute<br>
<br>
openssl x509 -in ca-int.crt -noout -text<br>
<br>
the CA flag should show as TRUE:<br>
<br>
X509v3 extensions:<br>
X509v3 Basic Constraints: critical<br>
CA:TRUE<br>
X509v3 Key Usage:<br>
Certificate Sign, CRL Sign<br>
<br>
Regards<br>
<br>
Andreas<div><div><br>
<br>
On <a href="tel:04.03.2014%2014" value="+49403201414" target="_blank">04.03.2014 14</a>:57, Sriram wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi Andreas,<br>
<br>
I think it is not loaded.<br>
<br>
On 10.206.1.11<br>
<br>
[root@localhost ~]# ipsec listcacerts<br>
<br>
List of X.509 CA Certificates:<br>
<br>
subject: "CN=DaRoot"<br>
issuer: "CN=DaRoot"<br>
serial: c9:95:0a:00:41:c4:d8:25<br>
validity: not before Mar 03 18:10:17 2014, ok<br>
not after Apr 02 18:10:17 2014, ok (expires in 28 days)<br>
pubkey: RSA 2048 bits<br>
keyid: be:25:1a:4a:e6:f8:44:c4:fe:32:<u></u>a8:d4:7c:9d:75:42:7d:51:19:0f<br>
subjkey: c3:59:68:a5:73:e8:b8:76:45:06:<u></u>3b:c8:a4:62:b3:06:61:7e:9a:c0<br>
authkey: c3:59:68:a5:73:e8:b8:76:45:06:<u></u>3b:c8:a4:62:b3:06:61:7e:9a:c0<br>
<br>
<br>
on 10.206.1.10<br>
[root@localhost ~]# ipsec listcacerts<br>
<br>
List of X.509 CA Certificates:<br>
<br>
subject: "CN=DaRoot"<br>
issuer: "CN=DaRoot"<br>
serial: c9:95:0a:00:41:c4:d8:25<br>
validity: not before Mar 03 18:10:17 2014, ok<br>
not after Apr 02 18:10:17 2014, ok (expires in 28 days)<br>
pubkey: RSA 2048 bits<br>
keyid: be:25:1a:4a:e6:f8:44:c4:fe:32:<u></u>a8:d4:7c:9d:75:42:7d:51:19:0f<br>
subjkey: c3:59:68:a5:73:e8:b8:76:45:06:<u></u>3b:c8:a4:62:b3:06:61:7e:9a:c0<br>
authkey: c3:59:68:a5:73:e8:b8:76:45:06:<u></u>3b:c8:a4:62:b3:06:61:7e:9a:c0<br>
<br>
Regards,<br>
Sriram.<br>
<br>
<br>
On Tue, Mar 4, 2014 at 6:49 PM, Andreas Steffen<br></div></div>
<<a href="mailto:andreas.steffen@strongswan.org" target="_blank">andreas.steffen@strongswan.<u></u>org</a> <mailto:<a href="mailto:andreas.steffen@strongswan.org" target="_blank">andreas.steffen@<u></u>strongswan.org</a>>><div>
<br>
wrote:<br>
<br>
Hi Sriram, could you post the output of the command<br>
<br>
ipsec listcacerts<br>
<br>
both on 10.206.1.10 and 10.206.1.11. This shows if the intermediate<br>
CA certificates have been successfully loaded.<br>
<br>
Regards<br>
<br>
Andreas<br>
<br>
<br></div><div><div>
On <a href="tel:04.03.2014%2012" value="+49403201412" target="_blank">04.03.2014 12</a> <tel:04.03.2014%2012>:45, Sriram wrote:<br>
<br>
Hi Everyone,<br>
<br>
I have host –to-host ipsec setup between 2 ips 10.206.1.10 and<br>
10.206.1.11<br>
<br>
Tunnel is established using certificates. Tunnel is established<br>
properly, when the certificates are generated using rootca.<br>
<br>
But when the certificates are generated using intermediate CA’s,<br>
tunnel<br>
is not getting established.<br>
<br>
In 10.206.1.10<br>
<br>
Under /etc/ipsec.d/cacerts/ I have copied ca.crt(root ca),<br>
*ca-int.crt(Intermediate ca)*<br>
<br>
<br>
In /etc/ipsec.d/certs/ I have copied end entity cert issued by<br>
ca-int.crt<br>
<br>
In 10.206.1.11<br>
<br>
Under /etc/ipsec.d/cacerts/ I have copied ca.crt(root ca),<br>
*ca-int1.crt(Intermediate ca)*<br>
<br>
<br>
In /etc/ipsec.d/certs/ I have copied end entity cert issued by<br>
ca-int1.crt<br>
<br>
I am getting below errors<br>
<br>
Mar3 19:34:45 localhost charon: 06[ENC] parsed IKE_AUTH request<br>
1 [ IDi<br>
<br>
CERT N(INIT_CONTACT) CERTREQ IDr AUTH CPRQ(ADDR) SA TSi TSr<br>
N(MULT_AUTH)<br>
N(EAP_ONLY) ]<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] received cert request for<br>
"CN=DaRoot"<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] received end entity cert<br>
"CN=1234abcd"<br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG] looking for peer configs<br>
<br></div></div>
matching 10.206.1.11[CN=12345abcde]..._<u></u>_10.206.1.10[CN=1234abcd]<div><br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG] peer config match local: 20<br>
<br>
(ID_DER_ASN1_DN -><br></div>
30:15:31:13:30:11:06:03:55:04:<u></u>__03:13:0a:31:32:33:34:35:61:<u></u>62:__63:64:65)<div><br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG] peer config match remote: 20<br>
<br>
(ID_DER_ASN1_DN -><br></div>
30:13:31:11:30:0f:06:03:55:04:<u></u>__03:13:08:31:32:33:34:61:62:<u></u>63:__64)<div><br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG] ike config match: 3100<br>
(10.206.1.11 10.206.1.10 IKEv2)<br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG]candidate "home1", match:<br>
20/20/3100 (me/other/ike)<br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG] selected peer config 'home1'<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] IDx' => 25 bytes @<br>
0xb4d82fe0<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]0: 09 00 00 00 30 13 31<br>
11 30 0F<br>
<br>
<a href="tel:06%2003%2055%2004%2003%2013....0.1.0" value="+4960355040313010" target="_blank">06 03 55 04 03 13....0.1.0</a><br></div>
<tel:06%2003%2055%2004%2003%<u></u>2013....0.1.0>...U...<div><br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]16: 08 31 32 33 34 61 62 63<br>
64.1234abcd<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] SK_p => 16 bytes @ 0x91c5340<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]0: 43 85 1F D8 CA 8B BD<br>
27 A0 58<br>
<br>
B8 9F 18 5C E7 C0C......'.X...\..<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] octets = message + nonce +<br>
<br>
prf(Sk_px, IDx') => 316 bytes @ 0x91c6d88<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]0: 95 B5 C1 A2 8D 13 C3<br>
77 00 00<br>
<br>
00 00 00 00 00 00.......w........<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]16: 21 20 22 08 00 00 00<br>
00 00 00<br>
<br>
01 0C 22 00 00 2C! "........."..,<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]32: 00 00 00 28 01 01 00<br>
04 03 00<br>
<br>
00 08 01 00 00 03...(............<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]48: <a href="tel:03%2000%2000" value="+4930000" target="_blank">03 00 00</a><br></div>
<tel:03%2000%2000> <tel:03%2000%2000><div><div><br>
<br>
08 03 00 00 01 03 00 00 08 02 00 00 01................<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]64: 00 00 00 08 04 00 00<br>
01 28 00<br>
<br>
00 68 00 01 00 00........(..h....<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]80: 23 F4 AC E7 E8 4E 55<br>
80 54 B7<br>
<br>
14 C8 48 B9 98 AE#....NU.T...H...<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]96: 15 DB CA F8 93 BF 31<br>
2D 59 89<br>
<br>
77 52 32 A8 0A 2D......1-Y.wR2..-<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]112: 78 3E 6F EB 6D 33 5A<br>
E6 A5<br>
<br>
B7 0F 9A 3C DA 4E D8x>o.m3Z.....<.N.<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]128: E6 71 B4 C4 5A D7 20<br>
48 61<br>
<br>
B2 34 14 99 0A F6 AF.q..Z. Ha.4.....<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]144: F8 DB 6D 82 B2 55 6C<br>
1B 84<br>
<br>
CA 37 8E C3 7F 50 8A..m..Ul...7...P.<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]160: 5C 2A 39 E4 27 FC 8D<br>
23 38<br>
<br>
95 E2 B2 F3 F9 8E CA\*9.'..#8.......<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]176: 29 00 00 24 03 8D 56<br>
09 5D<br>
<br>
B1 17 D2 BA 29 D6 8B)..$..V.]....)..<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]192: 7E 0B A5 2D 42 4C 1D<br>
37 D9<br>
<br>
EA 17 4A 0D 0C 77 67~..-BL.7...J..wg<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]208: E6 51 40 1D 29 00 00<br>
1C 00<br>
<br>
00 40 04 D5 2F E3 7F.Q@.).....@../..<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]224: 13 80 F3 7A 91 9D F2<br>
7A 0A<br>
<br>
6E C0 A9 E7 B2 72 63...z...z.n....rc<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]240: 00 00 00 1C 00 00 40<br>
05 BD<br>
<br>
B4 3E 98 F1 EB F4 10......@...>.....<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]256: 44 06 6B 25 90 C4 30<br>
CF BB<br>
<br>
FB FE 4C 00 9B 1E ADD.k%..0....L....<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]272: 19 7A F6 43 23 A9 8A<br>
C4 3C<br>
<br>
EF 98 57 13 69 07 0E.z.C#...<..W.i..<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]288: 9A E4 34 F1 A6 9B 48<br>
65 E8<br>
<br>
06 8A 6C 6D 30 6B C1..4...He...lm0k.<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE]304: F2 2C 6E 19 39 37 C1<br>
C6 2F<br>
48 D2 18.,n.97../H..<br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG]using certificate<br>
"CN=1234abcd"<br>
<br>
Mar3 19:34:45 localhost charon: 06[CFG]certificate "CN=1234abcd"<br>
key:<br>
2048 bit RSA<br>
<br>
*Mar3 19:34:45 localhost charon: 06[CFG] no issuer certificate<br>
found for<br>
"CN=1234abcd"*<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] no trusted RSA public<br>
key found<br>
for 'CN=1234abcd'<br>
<br>
Mar3 19:34:45 localhost charon: 06[IKE] processing<br>
INTERNAL_IP4_ADDRESS<br>
<br>
attribute<br>
<br>
Please let me know, how to resolve this issue.<br>
<br>
Below post suggests that the intermediate certs need to be sent<br>
along<br>
with the end-entity certificates in ike_auth message.<br>
<br>
If that can solve the issue, how can I achieve that.<br>
<br></div></div>
<a href="https://lists.strongswan.org/__pipermail/users/2013-March/__008956.html" target="_blank">https://lists.strongswan.org/_<u></u>_pipermail/users/2013-March/__<u></u>008956.html</a><div><br>
<<a href="https://lists.strongswan.org/pipermail/users/2013-March/008956.html" target="_blank">https://lists.strongswan.org/<u></u>pipermail/users/2013-March/<u></u>008956.html</a>><br>
<br>
Any help in this regard is appreciated.<br>
<br>
Regards,<br>
<br>
Sriram.<br>
<br>
<br>
<br>
<br>
<br>
<br></div>
______________________________<u></u>___________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.strongswan.org" target="_blank">Users@lists.strongswan.org</a> <mailto:<a href="mailto:Users@lists.strongswan.org" target="_blank">Users@lists.<u></u>strongswan.org</a>><br>
<a href="https://lists.strongswan.org/__mailman/listinfo/users" target="_blank">https://lists.strongswan.org/_<u></u>_mailman/listinfo/users</a><br>
<<a href="https://lists.strongswan.org/mailman/listinfo/users" target="_blank">https://lists.strongswan.org/<u></u>mailman/listinfo/users</a>><br>
<br>
<br>
--<br>
==============================<u></u>__============================<u></u>==__==========<br>
Andreas Steffen <a href="mailto:andreas.steffen@strongswan.org" target="_blank">andreas.steffen@strongswan.org</a><br>
<mailto:<a href="mailto:andreas.steffen@strongswan.org" target="_blank">andreas.steffen@<u></u>strongswan.org</a>><div><br>
strongSwan - the Open Source VPN Solution! <a href="http://www.strongswan.org" target="_blank">www.strongswan.org</a><br></div>
<<a href="http://www.strongswan.org" target="_blank">http://www.strongswan.org</a>><div><br>
Institute for Internet Technologies and Applications<br>
University of Applied Sciences Rapperswil<br>
CH-8640 Rapperswil (Switzerland)<br></div>
==============================<u></u>__============================<u></u>=[__ITA-HSR]==<br>
<br>
<br>
</blockquote><div><div>
<br>
-- <br>
==============================<u></u>==============================<u></u>==========<br>
Andreas Steffen <a href="mailto:andreas.steffen@strongswan.org" target="_blank">andreas.steffen@strongswan.org</a><br>
strongSwan - the Open Source VPN Solution! <a href="http://www.strongswan.org" target="_blank">www.strongswan.org</a><br>
Institute for Internet Technologies and Applications<br>
University of Applied Sciences Rapperswil<br>
CH-8640 Rapperswil (Switzerland)<br>
==============================<u></u>=============================[<u></u>ITA-HSR]==<br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>