Scep
These scenarios show how to configure the protocol SCEP to retrieve certificates from a PKI server; and then, establish a VPN site-to-site connection between two end-points.
Test SCEP Credentials Ready
Description
In this scenario, the credentials (X509 certificates) are retrieved before VPN settings are configured.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 tcp-mss 1200 set protocols static route 192.168.212.0/22 next-hop 10.215.168.1
Step 2: Set the following configuration in DUT2
:
set interfaces ethernet eth1 address 10.215.168.66/24 set interfaces ethernet eth1 tcp-mss 1200 set protocols static route 192.168.212.0/22 next-hop 10.215.168.1
Step 3: Ping IP address 192.168.213.25
from DUT0
:
admin@DUT0$ ping 192.168.213.25 count 1 size 56 timeout 1Show output
PING 192.168.213.25 (192.168.213.25) 56(84) bytes of data. 64 bytes from 192.168.213.25: icmp_seq=1 ttl=126 time=0.771 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.771/0.771/0.771/0.000 ms
Step 4: Ping IP address 192.168.213.25
from DUT2
:
admin@DUT2$ ping 192.168.213.25 count 1 size 56 timeout 1Show output
PING 192.168.213.25 (192.168.213.25) 56(84) bytes of data. 64 bytes from 192.168.213.25: icmp_seq=1 ttl=126 time=0.731 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.731/0.731/0.731/0.000 ms
Step 5: Set the following configuration in DUT0
:
set interfaces ethernet eth1 tcp-mss 1200 set interfaces dummy dum0 address 192.168.1.1/24 set interfaces ethernet eth0 address 8.0.0.2/24 set system certificate scep csr CSR distinguished-names 'DC=scep, DC=com, CN=entity1' set protocols static route 0.0.0.0/0 next-hop 8.0.0.1 set system certificate scep csr CSR cgi-path CertSrv/mscep/mscep.dll/pkiclient.exe set system certificate scep csr CSR challenge-password 8287796B080BB7573AD2C751E374FF64 set system certificate scep csr CSR url http://192.168.213.25/
Step 6: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 8.0.0.1/24 set interfaces ethernet eth1 address 9.0.0.1/24
Step 7: Set the following configuration in DUT2
:
set interfaces ethernet eth1 tcp-mss 1200 set interfaces dummy dum0 address 192.168.2.1/24 set interfaces ethernet eth0 address 9.0.0.2/24 set system certificate scep csr CSR distinguished-names 'DC=scep, DC=com, CN=entity2' set protocols static route 0.0.0.0/0 next-hop 9.0.0.1 set system certificate scep csr CSR cgi-path CertSrv/mscep/mscep.dll/pkiclient.exe set system certificate scep csr CSR challenge-password 8287796B080BB7573AD2C751E374FF64 set system certificate scep csr CSR url http://192.168.213.25/
Step 8: Run command pki scep show CSR
at DUT0
and check if output matches the following regular expressions:
CA_CERT\s+Valid USER_CERT\s+ValidShow output
----------------------------------------------------------------------- Certificate Status NotBefore NotAfter ----------------------------------------------------------------------- CA_CERT Valid Dec 14 10:00:35 2023 GMT Dec 14 10:10:34 2053 GMT USER_CERT Valid Dec 2 18:50:02 2024 GMT Dec 2 18:50:02 2026 GMT
Step 9: Run command pki scep show CSR
at DUT2
and check if output matches the following regular expressions:
CA_CERT\s+Valid USER_CERT\s+ValidShow output
----------------------------------------------------------------------- Certificate Status NotBefore NotAfter ----------------------------------------------------------------------- CA_CERT Valid Dec 14 10:00:35 2023 GMT Dec 14 10:10:34 2053 GMT USER_CERT Valid Dec 2 18:50:04 2024 GMT Dec 2 18:50:04 2026 GMT
Note
Now, the credentials are ready, so let’s configure the VPN site-to-site tunnel.
Step 10: Set the following configuration in DUT0
:
set vpn ipsec auth-profile AUTH mode x509 set vpn ipsec auth-profile AUTH local csr CSR set vpn ipsec auth-profile AUTH mirror-config false set vpn ipsec site-to-site peer PEER tunnel 1 esp-group ESP-POLICY set vpn ipsec site-to-site peer PEER ike-group IKE-POLICY set vpn ipsec ike-group IKE-POLICY key-exchange ikev2 set vpn ipsec ike-group IKE-POLICY lifetime 28800 set vpn ipsec ike-group IKE-POLICY proposal 1 encryption null set vpn ipsec ike-group IKE-POLICY proposal 1 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 1 dh-group 15 set vpn ipsec ike-group IKE-POLICY proposal 2 encryption aes256 set vpn ipsec ike-group IKE-POLICY proposal 2 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 2 dh-group 15 set vpn ipsec ike-group IKE-POLICY dead-peer-detection interval 60 set vpn ipsec esp-group ESP-POLICY lifetime 28800 set vpn ipsec esp-group ESP-POLICY proposal 1 encryption null set vpn ipsec esp-group ESP-POLICY proposal 1 hash sha1 set vpn ipsec esp-group ESP-POLICY proposal 1 pfs dh-group15 set vpn ipsec logging log-types any log-level 1 set vpn ipsec site-to-site peer PEER auth-profile AUTH set vpn ipsec site-to-site peer PEER local-address 8.0.0.2 set vpn ipsec site-to-site peer PEER remote 9.0.0.2 set vpn ipsec site-to-site peer PEER tunnel 1 local prefix 192.168.1.0/24 set vpn ipsec site-to-site peer PEER tunnel 1 remote prefix 192.168.2.0/24 set vpn ipsec site-to-site peer PEER connection-type respond
Step 11: Set the following configuration in DUT2
:
set vpn ipsec auth-profile AUTH mode x509 set vpn ipsec auth-profile AUTH local csr CSR set vpn ipsec auth-profile AUTH mirror-config false set vpn ipsec site-to-site peer PEER tunnel 1 esp-group ESP-POLICY set vpn ipsec site-to-site peer PEER ike-group IKE-POLICY set vpn ipsec ike-group IKE-POLICY key-exchange ikev2 set vpn ipsec ike-group IKE-POLICY lifetime 28800 set vpn ipsec ike-group IKE-POLICY proposal 1 encryption null set vpn ipsec ike-group IKE-POLICY proposal 1 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 1 dh-group 15 set vpn ipsec ike-group IKE-POLICY proposal 2 encryption aes256 set vpn ipsec ike-group IKE-POLICY proposal 2 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 2 dh-group 15 set vpn ipsec ike-group IKE-POLICY dead-peer-detection interval 60 set vpn ipsec esp-group ESP-POLICY lifetime 28800 set vpn ipsec esp-group ESP-POLICY proposal 1 encryption null set vpn ipsec esp-group ESP-POLICY proposal 1 hash sha1 set vpn ipsec esp-group ESP-POLICY proposal 1 pfs dh-group15 set vpn ipsec logging log-types any log-level 1 set vpn ipsec site-to-site peer PEER auth-profile AUTH set vpn ipsec site-to-site peer PEER local-address 9.0.0.2 set vpn ipsec site-to-site peer PEER remote 8.0.0.2 set vpn ipsec site-to-site peer PEER tunnel 1 local prefix 192.168.2.0/24 set vpn ipsec site-to-site peer PEER tunnel 1 remote prefix 192.168.1.0/24 set vpn ipsec site-to-site peer PEER connection-type initiate
Step 12: Run command vpn ipsec show sa
at DUT0
and check if output matches the following regular expressions:
vpn-peer-PEER: \#\d, ESTABLISHED, IKEv2Show output
vpn-peer-PEER: #1, ESTABLISHED, IKEv2, 7805b6d31c6bca24_i 27fe1ca2eba3e182_r* local 'DC=scep, DC=com, CN=entity1' @ 8.0.0.2[500] remote 'DC=scep, DC=com, CN=entity2' @ 9.0.0.2[500] NULL/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_3072 established 0s ago, rekeying in 25765s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 14436s, expires in 31680s in cd1721d7, 0 bytes, 0 packets out cea66fdb, 0 bytes, 0 packets local 192.168.1.0/24 remote 192.168.2.0/24
Step 13: Run command vpn ipsec show sa
at DUT2
and check if output matches the following regular expressions:
vpn-peer-PEER: \#\d, ESTABLISHED, IKEv2Show output
vpn-peer-PEER: #1, ESTABLISHED, IKEv2, 7805b6d31c6bca24_i* 27fe1ca2eba3e182_r local 'DC=scep, DC=com, CN=entity2' @ 9.0.0.2[500] remote 'DC=scep, DC=com, CN=entity1' @ 8.0.0.2[500] NULL/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_3072 established 0s ago, rekeying in 14802s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 27824s, expires in 31680s in cea66fdb, 0 bytes, 0 packets out cd1721d7, 0 bytes, 0 packets local 192.168.2.0/24 remote 192.168.1.0/24
Step 14: Run command pki show remote-certificate site-to-site PEER filter-issuer TELDAT
at DUT0
and check if output contains the following tokens:
DC = scep, DC = com, CN = entity2Show output
Certificate: Data: Version: 3 (0x2) Serial Number: 1c:00:00:7e:07:6f:6c:4c:d4:69:4d:72:f7:00:00:00:00:7e:07 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Dec 2 18:50:04 2024 GMT Not After : Dec 2 18:50:04 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c5:d7:2e:99:a6:81:f5:5d:bc:6c:14:4b:71:1f: 63:c3:11:be:fd:1b:6c:57:ba:e4:99:9e:20:40:91: 43:4a:e4:17:2b:e6:ca:76:d7:87:3a:e3:c6:f0:fc: f6:d4:00:76:8b:c7:e5:ec:f6:e0:7b:35:08:14:fc: 79:9a:13:9a:c3:33:d1:c7:3e:d9:a3:65:85:50:7c: 6f:26:5d:78:60:8f:17:bb:8e:49:bb:e6:cb:a6:12: 07:3b:cd:71:68:50:56:01:de:02:c8:cc:83:62:5a: c0:10:90:9c:9e:5f:b3:b7:3f:05:2c:2a:6e:53:7e: 00:74:fb:16:9b:c3:4a:32:3f:69:63:27:20:61:02: 9b:d7:ff:b4:37:d0:7a:8b:b6:6c:1e:07:ae:fd:e6: e9:98:1e:40:8a:50:31:db:a4:19:44:e7:fb:9a:68: 92:79:7a:a5:f4:8c:f2:ec:3c:56:5b:b0:69:7c:fa: 5f:59:be:7e:12:18:95:5f:b9:95:f6:00:be:2a:0b: 8f:eb:70:59:b2:45:8d:3e:46:34:78:1d:d2:4a:5d: 97:57:90:6f:62:a5:e5:fe:81:55:88:c9:9b:22:66: 04:80:95:89:ce:04:e2:3c:11:9d:e5:a0:77:7d:10: 73:26:33:7a:31:8d:b1:75:32:60:41:1d:45:54:34: 13:b9 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: E6:15:D5:94:1A:51:28:E9:F6:80:A6:C5:B7:99:F9:8E:BD:82:72:30 X509v3 Authority Key Identifier: keyid:AF:CF:34:AD:5B:BC:15:CF:9E:0B:FB:4A:ED:09:79:E0:01:68:5D:B8 X509v3 CRL Distribution Points: Full Name: URI:http://192.168.213.25/CertEnroll/scep-TELDATPKI-CA.crl Authority Information Access: CA Issuers - URI:ldap:///CN=scep-TELDATPKI-CA,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=scep,DC=com?cACertificate?base?objectClass=certificationAuthority X509v3 Key Usage: critical Digital Signature, Key Encipherment, Data Encipherment 1.3.6.1.4.1.311.21.7: 0..&+.....7.....3......./...(...f<...[...]..d... X509v3 Extended Key Usage: 1.3.6.1.4.1.311.20.1, Microsoft Encrypted File System, Code Signing, Any Extended Key Usage, TLS Web Server Authentication, Signing KDC Response, TLS Web Client Authentication, 1.3.6.1.4.1.311.21.5, 1.3.6.1.4.1.311.20.2.1, 1.3.6.1.5.5.8.2.2 1.3.6.1.4.1.311.21.10: 0y0...+.....7..0.. +.....7 ..0 ..+.......0...U.%.0 ..+.......0...+......0 ..+.......0...+.....7..0.. +.....7...0 ..+....... S/MIME Capabilities: ......0...+....0050...*.H.. ..*.H.. Signature Algorithm: sha256WithRSAEncryption 32:58:77:4c:97:d0:73:72:a9:39:63:8b:b5:48:f9:b4:43:eb: f9:33:79:09:bb:71:e0:73:13:75:c4:e6:7c:e9:e3:d6:74:b5: 87:01:40:dd:62:11:60:7c:df:c0:0b:e0:33:cc:51:e8:ef:ab: 41:88:ae:9e:fa:a1:aa:e7:ff:17:ec:d2:e7:34:f1:6d:9c:c6: 61:8f:76:ef:45:f4:35:40:91:a3:1a:e1:ff:5b:7a:7d:46:10: 24:ad:26:e4:49:34:8a:65:8f:26:8d:ef:73:cf:88:36:32:b8: ab:f9:fd:bf:3a:76:db:98:c1:1e:2a:c1:cc:d4:36:6f:0a:ac: 02:aa:14:b9:78:48:14:c7:0e:3c:e9:1e:64:c3:fb:8a:06:a4: d4:b7:9d:0c:89:c4:58:d2:2f:41:20:e3:d8:81:7b:40:c0:2d: 02:66:50:74:8f:dc:b8:17:4b:fe:fc:9e:05:9a:08:b0:3b:5e: e7:f5:8c:4b:ee:79:5b:67:ea:38:c3:03:19:16:a7:ee:8a:4b: 6a:27:d4:f2:d2:d5:24:5b:a3:43:da:c2:3f:b4:c4:9c:b1:2e: d2:fe:a8:49:e9:d2:1b:4b:ea:5e:5c:20:d7:90:9b:c6:3a:83: eb:e9:1f:8c:33:86:10:d1:ec:37:38:06:a9:d0:03:7d:31:72: 4a:68:12:db
Step 15: Run command pki show remote-certificate site-to-site PEER filter-issuer TELDAT
at DUT2
and check if output contains the following tokens:
DC = scep, DC = com, CN = entity1Show output
Certificate: Data: Version: 3 (0x2) Serial Number: 1c:00:00:7e:06:f0:34:a4:a8:bb:1a:ce:7a:00:00:00:00:7e:06 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Dec 2 18:50:02 2024 GMT Not After : Dec 2 18:50:02 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:cd:f9:16:08:54:fe:bc:33:cf:56:31:fd:30:c8: 53:01:1f:e1:5f:11:97:de:ff:1f:99:71:dc:1b:05: a0:be:e4:43:cc:7c:83:14:87:b4:c6:46:de:f0:61: 14:38:b5:40:f9:e7:09:77:df:95:5a:13:7b:11:65: 19:fc:a0:10:77:b8:bf:7c:b4:40:3d:96:bb:77:c9: 21:bd:8a:7f:f3:31:5d:b2:60:9b:d6:84:7d:5a:f3: d1:0e:a9:e2:c1:28:82:6a:b9:61:b7:b2:be:6d:31: 39:ac:1f:82:55:75:30:57:7b:0f:cb:c1:ac:c6:cb: 8e:7b:59:64:b0:f1:01:3c:7c:11:43:a9:c5:f9:31: 97:c1:a1:1c:38:2c:9d:62:d2:8e:32:87:14:b1:fa: 5b:bf:3f:4b:83:ce:34:eb:0d:35:c9:5b:df:5c:69: 8b:18:3a:0d:3d:6d:e2:30:46:a2:d9:93:4d:85:6c: 90:e1:12:15:b8:5a:bc:62:6d:98:2a:7f:98:b1:6d: 49:d8:0c:51:b4:b0:6e:e8:6b:97:fa:74:54:c2:a6: d7:d6:36:70:f6:f0:a2:bb:13:41:ad:9d:8a:9e:39: a0:92:f8:bb:19:2f:92:69:5d:65:f1:dc:2c:9e:cf: 64:35:6d:9f:57:36:1d:09:92:53:02:ad:d4:42:da: 74:07 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 43:B0:C1:5B:1C:03:17:50:7E:6D:4C:84:15:AB:1B:21:C8:27:EC:C4 X509v3 Authority Key Identifier: keyid:AF:CF:34:AD:5B:BC:15:CF:9E:0B:FB:4A:ED:09:79:E0:01:68:5D:B8 X509v3 CRL Distribution Points: Full Name: URI:http://192.168.213.25/CertEnroll/scep-TELDATPKI-CA.crl Authority Information Access: CA Issuers - URI:ldap:///CN=scep-TELDATPKI-CA,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=scep,DC=com?cACertificate?base?objectClass=certificationAuthority X509v3 Key Usage: critical Digital Signature, Key Encipherment, Data Encipherment 1.3.6.1.4.1.311.21.7: 0..&+.....7.....3......./...(...f<...[...]..d... X509v3 Extended Key Usage: 1.3.6.1.4.1.311.20.1, Microsoft Encrypted File System, Code Signing, Any Extended Key Usage, TLS Web Server Authentication, Signing KDC Response, TLS Web Client Authentication, 1.3.6.1.4.1.311.21.5, 1.3.6.1.4.1.311.20.2.1, 1.3.6.1.5.5.8.2.2 1.3.6.1.4.1.311.21.10: 0y0...+.....7..0.. +.....7 ..0 ..+.......0...U.%.0 ..+.......0...+......0 ..+.......0...+.....7..0.. +.....7...0 ..+....... S/MIME Capabilities: ......0...+....0050...*.H.. ..*.H.. Signature Algorithm: sha256WithRSAEncryption 48:2f:75:30:82:1f:df:7a:f2:e0:99:42:ca:ce:8c:13:b6:db: da:59:df:39:f8:20:2c:c1:96:70:5b:4c:0c:96:ce:91:6e:73: bf:f0:24:48:86:65:6d:1b:c3:8c:45:69:3b:8d:1e:52:37:f4: 6f:38:5a:c0:02:c1:ac:02:06:74:ba:e6:5f:43:c4:3a:4c:57: 60:5f:2a:74:c0:8f:92:0f:50:3c:5a:aa:e4:fe:47:aa:82:25: d0:84:32:07:bf:1c:00:71:24:f9:bc:40:c8:08:bd:e3:50:62: 12:87:b0:48:89:02:40:94:03:1a:53:2e:69:af:bf:a8:91:b7: 62:a5:56:12:cd:27:0f:cb:28:ca:e3:b5:f7:05:d9:6f:c9:b3: 26:d8:57:87:d0:32:2f:24:67:44:62:f8:38:75:d6:63:e7:09: 1a:a8:0e:78:69:d7:f7:f6:6c:34:54:87:97:de:73:20:06:a6: 26:b2:6b:cb:41:ce:6e:a1:12:29:3d:47:82:9b:a8:c2:e2:3d: 95:62:a9:af:67:07:de:67:42:0d:d7:9e:14:ba:f0:26:09:f3: 3f:fd:e9:e0:bc:f0:0d:06:e3:46:37:b8:cb:f6:20:09:31:b0: 63:70:3f:c7:cc:61:5b:b2:41:2d:82:26:43:fd:c2:21:b5:da: a2:c7:0f:7a
Step 16: Ping IP address 192.168.2.1
from DUT0
:
admin@DUT0$ ping 192.168.2.1 local-address 192.168.1.1 count 1 size 56 timeout 1Show output
PING 192.168.2.1 (192.168.2.1) from 192.168.1.1 : 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=8.30 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 8.295/8.295/8.295/0.000 ms
Step 17: Ping IP address 192.168.1.1
from DUT2
:
admin@DUT2$ ping 192.168.1.1 local-address 192.168.2.1 count 1 size 56 timeout 1Show output
PING 192.168.1.1 (192.168.1.1) from 192.168.2.1 : 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.646 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.646/0.646/0.646/0.000 ms
Test SCEP Credentials Not Ready
Description
In this scenario, the credentials (X509 certificates) are not available when the VPN configuration is committed. However, once the credentials are downloaded, the VPN tunnel is set-up automatically.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth1 address 10.215.168.64/24 set interfaces ethernet eth1 tcp-mss 1200 set protocols static route 192.168.212.0/22 next-hop 10.215.168.1
Step 2: Set the following configuration in DUT2
:
set interfaces ethernet eth1 address 10.215.168.66/24 set interfaces ethernet eth1 tcp-mss 1200 set protocols static route 192.168.212.0/22 next-hop 10.215.168.1
Step 3: Ping IP address 192.168.213.25
from DUT0
:
admin@DUT0$ ping 192.168.213.25 count 1 size 56 timeout 1Show output
PING 192.168.213.25 (192.168.213.25) 56(84) bytes of data. 64 bytes from 192.168.213.25: icmp_seq=1 ttl=126 time=0.753 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.753/0.753/0.753/0.000 ms
Step 4: Ping IP address 192.168.213.25
from DUT2
:
admin@DUT2$ ping 192.168.213.25 count 1 size 56 timeout 1Show output
PING 192.168.213.25 (192.168.213.25) 56(84) bytes of data. 64 bytes from 192.168.213.25: icmp_seq=1 ttl=126 time=0.643 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.643/0.643/0.643/0.000 ms
Step 5: Set the following configuration in DUT0
:
set interfaces ethernet eth1 tcp-mss 1200 set interfaces dummy dum0 address 192.168.1.1/24 set interfaces ethernet eth0 address 8.0.0.2/24 set system certificate scep csr CSR distinguished-names 'DC=scep, DC=com, CN=entity1' set protocols static route 0.0.0.0/0 next-hop 8.0.0.1 set system certificate scep csr CSR cgi-path CertSrv/mscep/mscep.dll/pkiclient.exe set system certificate scep csr CSR challenge-password 8287796B080BB7573AD2C751E374FF64 set system certificate scep csr CSR url http://192.168.213.25/ set vpn ipsec auth-profile AUTH mode x509 set vpn ipsec auth-profile AUTH local csr CSR set vpn ipsec auth-profile AUTH mirror-config false set vpn ipsec site-to-site peer PEER tunnel 1 esp-group ESP-POLICY set vpn ipsec site-to-site peer PEER ike-group IKE-POLICY set vpn ipsec ike-group IKE-POLICY key-exchange ikev2 set vpn ipsec ike-group IKE-POLICY lifetime 28800 set vpn ipsec ike-group IKE-POLICY proposal 1 encryption null set vpn ipsec ike-group IKE-POLICY proposal 1 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 1 dh-group 15 set vpn ipsec ike-group IKE-POLICY proposal 2 encryption aes256 set vpn ipsec ike-group IKE-POLICY proposal 2 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 2 dh-group 15 set vpn ipsec ike-group IKE-POLICY dead-peer-detection interval 60 set vpn ipsec esp-group ESP-POLICY lifetime 28800 set vpn ipsec esp-group ESP-POLICY proposal 1 encryption null set vpn ipsec esp-group ESP-POLICY proposal 1 hash sha1 set vpn ipsec esp-group ESP-POLICY proposal 1 pfs dh-group15 set vpn ipsec logging log-types any log-level 1 set vpn ipsec site-to-site peer PEER auth-profile AUTH set vpn ipsec site-to-site peer PEER local-address 8.0.0.2 set vpn ipsec site-to-site peer PEER remote 9.0.0.2 set vpn ipsec site-to-site peer PEER tunnel 1 local prefix 192.168.1.0/24 set vpn ipsec site-to-site peer PEER tunnel 1 remote prefix 192.168.2.0/24 set vpn ipsec site-to-site peer PEER connection-type respond set system certificate scep csr CSR port 443
Step 6: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 8.0.0.1/24 set interfaces ethernet eth1 address 9.0.0.1/24
Step 7: Set the following configuration in DUT2
:
set interfaces ethernet eth1 tcp-mss 1200 set interfaces dummy dum0 address 192.168.2.1/24 set interfaces ethernet eth0 address 9.0.0.2/24 set system certificate scep csr CSR distinguished-names 'DC=scep, DC=com, CN=entity2' set protocols static route 0.0.0.0/0 next-hop 9.0.0.1 set system certificate scep csr CSR cgi-path CertSrv/mscep/mscep.dll/pkiclient.exe set system certificate scep csr CSR challenge-password 8287796B080BB7573AD2C751E374FF64 set system certificate scep csr CSR url http://192.168.213.25/ set vpn ipsec auth-profile AUTH mode x509 set vpn ipsec auth-profile AUTH local csr CSR set vpn ipsec auth-profile AUTH mirror-config false set vpn ipsec site-to-site peer PEER tunnel 1 esp-group ESP-POLICY set vpn ipsec site-to-site peer PEER ike-group IKE-POLICY set vpn ipsec ike-group IKE-POLICY key-exchange ikev2 set vpn ipsec ike-group IKE-POLICY lifetime 28800 set vpn ipsec ike-group IKE-POLICY proposal 1 encryption null set vpn ipsec ike-group IKE-POLICY proposal 1 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 1 dh-group 15 set vpn ipsec ike-group IKE-POLICY proposal 2 encryption aes256 set vpn ipsec ike-group IKE-POLICY proposal 2 hash sha1 set vpn ipsec ike-group IKE-POLICY proposal 2 dh-group 15 set vpn ipsec ike-group IKE-POLICY dead-peer-detection interval 60 set vpn ipsec esp-group ESP-POLICY lifetime 28800 set vpn ipsec esp-group ESP-POLICY proposal 1 encryption null set vpn ipsec esp-group ESP-POLICY proposal 1 hash sha1 set vpn ipsec esp-group ESP-POLICY proposal 1 pfs dh-group15 set vpn ipsec logging log-types any log-level 1 set vpn ipsec site-to-site peer PEER auth-profile AUTH set vpn ipsec site-to-site peer PEER local-address 9.0.0.2 set vpn ipsec site-to-site peer PEER remote 8.0.0.2 set vpn ipsec site-to-site peer PEER tunnel 1 local prefix 192.168.2.0/24 set vpn ipsec site-to-site peer PEER tunnel 1 remote prefix 192.168.1.0/24 set vpn ipsec site-to-site peer PEER connection-type initiate set system certificate scep csr CSR port 443
Step 8: Run command pki scep show CSR
at DUT0
and check if output matches the following regular expressions:
CA_CERT\s+Uninitialized USER_CERT\s+UninitializedShow output
----------------------------------------------- Certificate Status NotBefore NotAfter ----------------------------------------------- CA_CERT Uninitialized USER_CERT Uninitialized
Step 9: Run command pki scep show CSR
at DUT2
and check if output matches the following regular expressions:
CA_CERT\s+Uninitialized USER_CERT\s+UninitializedShow output
----------------------------------------------- Certificate Status NotBefore NotAfter ----------------------------------------------- CA_CERT Uninitialized USER_CERT Uninitialized
Note
The credentials will not be downloaded because the port for the connection to PKI server is configured wrong on purpose. Once the credentials are ready, the VPN should be established automatically.
Step 10: Set the following configuration in DUT0
:
set system certificate scep csr CSR port 80
Step 11: Set the following configuration in DUT2
:
set system certificate scep csr CSR port 80
Step 12: Run command pki scep show CSR
at DUT0
and check if output matches the following regular expressions:
CA_CERT\s+Valid USER_CERT\s+ValidShow output
----------------------------------------------------------------------- Certificate Status NotBefore NotAfter ----------------------------------------------------------------------- CA_CERT Valid Dec 14 10:00:35 2023 GMT Dec 14 10:10:34 2053 GMT USER_CERT Valid Dec 2 18:51:21 2024 GMT Dec 2 18:51:21 2026 GMT
Step 13: Run command pki scep show CSR
at DUT2
and check if output matches the following regular expressions:
CA_CERT\s+Valid USER_CERT\s+ValidShow output
----------------------------------------------------------------------- Certificate Status NotBefore NotAfter ----------------------------------------------------------------------- CA_CERT Valid Dec 14 10:00:35 2023 GMT Dec 14 10:10:34 2053 GMT USER_CERT Valid Dec 2 18:51:27 2024 GMT Dec 2 18:51:27 2026 GMT
Step 14: Run command vpn ipsec show sa
at DUT0
and check if output matches the following regular expressions:
vpn-peer-PEER: \#\d, ESTABLISHED, IKEv2Show output
vpn-peer-PEER: #1, ESTABLISHED, IKEv2, 4e3605e21ff551d4_i 71b66ca3975db44e_r* local 'DC=scep, DC=com, CN=entity1' @ 8.0.0.2[500] remote 'DC=scep, DC=com, CN=entity2' @ 9.0.0.2[500] NULL/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_3072 established 0s ago, rekeying in 23009s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 22016s, expires in 31680s in cf9ffd9c, 0 bytes, 0 packets out cc80fafa, 0 bytes, 0 packets local 192.168.1.0/24 remote 192.168.2.0/24
Step 15: Run command vpn ipsec show sa
at DUT2
and check if output matches the following regular expressions:
vpn-peer-PEER: \#\d, ESTABLISHED, IKEv2Show output
vpn-peer-PEER: #1, ESTABLISHED, IKEv2, 4e3605e21ff551d4_i* 71b66ca3975db44e_r local 'DC=scep, DC=com, CN=entity2' @ 9.0.0.2[500] remote 'DC=scep, DC=com, CN=entity1' @ 8.0.0.2[500] NULL/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_3072 established 0s ago, rekeying in 25600s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 16156s, expires in 31680s in cc80fafa, 0 bytes, 0 packets out cf9ffd9c, 0 bytes, 0 packets local 192.168.2.0/24 remote 192.168.1.0/24
Step 16: Run command pki show remote-certificate site-to-site PEER filter-issuer TELDAT
at DUT0
and check if output contains the following tokens:
DC = scep, DC = com, CN = entity2Show output
Certificate: Data: Version: 3 (0x2) Serial Number: 1c:00:00:7e:09:ec:4f:91:0f:5c:f0:c9:ae:00:00:00:00:7e:09 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Dec 2 18:51:27 2024 GMT Not After : Dec 2 18:51:27 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c7:2f:ad:23:83:16:f4:65:9f:9c:e8:ef:f3:d6: 69:4a:89:f0:fc:a3:23:76:a5:fd:cc:d3:14:0d:86: 01:92:bb:87:2c:36:eb:42:05:8a:ea:64:f5:a9:00: 50:73:0a:7f:0b:4e:ab:2f:7b:71:02:0a:3c:b1:a3: 10:1b:70:70:d0:6c:f3:99:23:82:1b:b4:c4:07:c0: d1:a0:35:eb:a3:d3:13:9c:68:50:d5:a8:73:20:ab: 16:f0:45:23:23:c6:f5:97:1e:f6:a1:f8:34:5d:1c: 93:56:17:e4:54:e2:68:86:0c:73:78:78:a3:92:da: ce:a4:14:47:8f:d5:ba:94:b0:73:ef:4d:b4:78:99: 88:f5:8f:6e:5b:f1:16:f2:dd:53:44:db:8c:2b:cb: ea:f7:85:7d:1f:36:c5:e3:ab:0a:3d:aa:c6:9e:a8: 08:71:ba:2e:dc:47:4d:5d:dc:9b:8d:01:6f:96:b1: 41:fa:3a:c9:e6:ed:72:be:5a:1a:2e:46:4b:6e:7b: 00:f9:1d:97:61:a9:ee:25:95:21:04:7e:4e:56:ac: 67:53:e2:d7:15:23:58:42:0f:ef:bd:e0:9b:a6:b7: 6c:06:ba:12:16:e9:c8:6d:c1:13:11:f7:85:1c:c8: ed:75:86:95:73:c8:d1:4f:fa:23:3b:c8:0c:a3:45: 07:db Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 33:60:7D:DB:22:FB:90:E6:A1:FA:DF:12:36:F9:2D:86:C6:A7:BA:E3 X509v3 Authority Key Identifier: keyid:AF:CF:34:AD:5B:BC:15:CF:9E:0B:FB:4A:ED:09:79:E0:01:68:5D:B8 X509v3 CRL Distribution Points: Full Name: URI:http://192.168.213.25/CertEnroll/scep-TELDATPKI-CA.crl Authority Information Access: CA Issuers - URI:ldap:///CN=scep-TELDATPKI-CA,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=scep,DC=com?cACertificate?base?objectClass=certificationAuthority X509v3 Key Usage: critical Digital Signature, Key Encipherment, Data Encipherment 1.3.6.1.4.1.311.21.7: 0..&+.....7.....3......./...(...f<...[...]..d... X509v3 Extended Key Usage: 1.3.6.1.4.1.311.20.1, Microsoft Encrypted File System, Code Signing, Any Extended Key Usage, TLS Web Server Authentication, Signing KDC Response, TLS Web Client Authentication, 1.3.6.1.4.1.311.21.5, 1.3.6.1.4.1.311.20.2.1, 1.3.6.1.5.5.8.2.2 1.3.6.1.4.1.311.21.10: 0y0...+.....7..0.. +.....7 ..0 ..+.......0...U.%.0 ..+.......0...+......0 ..+.......0...+.....7..0.. +.....7...0 ..+....... S/MIME Capabilities: ......0...+....0050...*.H.. ..*.H.. Signature Algorithm: sha256WithRSAEncryption 38:6c:26:8d:e3:aa:5f:3f:bc:3a:1a:c2:c2:ee:69:ca:a4:05: 91:96:23:99:ee:a2:e9:ee:85:7c:fe:e6:77:57:07:05:11:e6: 40:50:07:06:73:75:c3:68:6f:b2:74:1d:4c:e7:a7:09:3c:e5: c8:33:7e:26:08:06:b3:08:16:dc:24:e3:f4:76:6e:0e:6c:e1: 78:7a:58:3c:78:64:54:09:fd:5c:dd:c8:1a:c6:92:b1:92:e8: 69:43:ed:72:7a:79:35:c5:f5:62:47:5b:d7:32:a0:56:13:79: ff:82:9d:ac:34:42:5c:8e:9e:52:6c:ff:05:45:66:09:31:c8: 74:86:36:7a:06:d8:2b:25:52:01:68:f8:d4:38:21:5b:23:59: cf:c9:0e:7b:ca:bd:0b:7d:36:dd:f6:60:2f:86:71:06:f0:a9: 52:3f:11:fd:99:67:20:56:68:64:fd:35:35:99:e5:45:91:bc: 4f:e4:a4:2e:87:df:20:76:d5:dd:70:11:3b:c7:ee:73:e5:83: 2a:0e:f7:83:39:8d:e3:ec:8b:9f:d3:2d:de:ad:46:9e:da:07: ae:a6:c7:b3:30:f0:c2:74:f4:fb:59:ca:39:4b:d9:ed:a4:44: bb:43:8f:b6:31:65:85:3e:d1:37:c9:15:ba:12:4c:35:d5:8f: d2:59:32:c1
Step 17: Run command pki show remote-certificate site-to-site PEER filter-issuer TELDAT
at DUT2
and check if output contains the following tokens:
DC = scep, DC = com, CN = entity1Show output
Certificate: Data: Version: 3 (0x2) Serial Number: 1c:00:00:7e:08:4d:dc:1f:00:2d:b8:4e:79:00:00:00:00:7e:08 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Dec 2 18:51:21 2024 GMT Not After : Dec 2 18:51:21 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:e7:06:61:68:d3:93:20:ec:87:01:04:04:83:86: 5f:67:b5:dd:7f:6c:4a:6d:9d:ae:b3:28:66:ce:04: ec:2a:a4:55:7a:0b:d0:46:b9:e7:d0:6d:a5:5b:51: bc:5f:11:14:87:66:62:26:14:2e:58:09:6c:15:64: fb:df:89:54:95:b2:54:d9:e0:ce:1f:7e:56:ca:18: a7:de:15:b2:0a:b5:bf:1e:3a:fb:fb:4e:e6:46:19: 72:e6:a6:57:80:e0:22:de:76:5e:79:f4:78:72:1c: 11:7b:8f:63:38:60:b5:dc:06:5b:cc:52:77:9a:94: 01:e2:16:43:c9:04:1b:ae:16:73:d2:4e:ac:06:da: 4b:ca:88:98:f6:a2:ca:6e:5d:09:8f:2b:da:ab:29: 97:dc:f6:0d:84:f7:fb:48:6f:4c:99:ed:54:6e:62: b6:7f:52:c8:02:61:c6:34:92:ef:69:0b:06:2f:74: 73:0c:3d:aa:4e:79:cd:00:d1:16:19:20:48:e2:9f: 2b:7e:e5:38:f3:51:f1:31:9a:38:5b:75:9f:8f:1b: 01:45:08:e5:c7:45:99:fc:39:9a:5d:ea:75:ab:59: 1e:bc:87:23:e0:44:83:91:d2:ab:48:cd:21:7c:95: 13:5c:47:e8:61:36:96:3e:b4:be:eb:fd:e8:a5:46: 2c:df Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 5E:60:FA:EA:45:47:73:E5:85:16:F7:BB:FF:BC:E3:B4:92:E1:79:51 X509v3 Authority Key Identifier: keyid:AF:CF:34:AD:5B:BC:15:CF:9E:0B:FB:4A:ED:09:79:E0:01:68:5D:B8 X509v3 CRL Distribution Points: Full Name: URI:http://192.168.213.25/CertEnroll/scep-TELDATPKI-CA.crl Authority Information Access: CA Issuers - URI:ldap:///CN=scep-TELDATPKI-CA,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=scep,DC=com?cACertificate?base?objectClass=certificationAuthority X509v3 Key Usage: critical Digital Signature, Key Encipherment, Data Encipherment 1.3.6.1.4.1.311.21.7: 0..&+.....7.....3......./...(...f<...[...]..d... X509v3 Extended Key Usage: 1.3.6.1.4.1.311.20.1, Microsoft Encrypted File System, Code Signing, Any Extended Key Usage, TLS Web Server Authentication, Signing KDC Response, TLS Web Client Authentication, 1.3.6.1.4.1.311.21.5, 1.3.6.1.4.1.311.20.2.1, 1.3.6.1.5.5.8.2.2 1.3.6.1.4.1.311.21.10: 0y0...+.....7..0.. +.....7 ..0 ..+.......0...U.%.0 ..+.......0...+......0 ..+.......0...+.....7..0.. +.....7...0 ..+....... S/MIME Capabilities: ......0...+....0050...*.H.. ..*.H.. Signature Algorithm: sha256WithRSAEncryption 65:d5:e0:b4:99:c6:36:e1:cc:f7:72:40:e0:4c:10:e6:9b:bf: 82:00:75:50:85:7a:38:2a:cf:48:4a:e0:98:72:29:f2:e5:02: 43:17:9f:6c:47:7e:ad:cd:83:e8:5e:2a:3a:d0:27:32:68:c5: b6:02:53:91:a3:03:f0:14:9c:6f:27:2a:e1:99:90:d8:35:86: 16:ff:45:93:81:ce:ef:83:df:33:cb:3d:99:b6:31:9d:8e:f9: 06:fd:4c:8a:71:ac:19:cd:53:86:8c:2e:26:9f:d7:a0:29:ab: 5c:44:83:5a:06:12:a5:9b:bc:64:b6:f7:81:83:ae:dc:5f:e1: b1:40:78:43:ec:60:fd:3b:5f:c3:1a:91:49:24:97:6e:c2:f2: ca:26:e3:ad:46:d8:2a:d7:b7:dd:45:6d:f1:8b:e4:dd:c1:f1: 88:39:d2:58:ed:c3:a3:f0:70:42:35:55:f7:18:09:ae:1b:1a: f4:b3:34:ae:17:a5:79:04:5e:0b:4c:0f:33:c8:41:6a:39:1a: 1d:80:d3:a6:28:c7:76:f8:14:33:79:d9:13:c3:62:0e:c4:16: df:57:ae:2d:84:ca:63:4a:5a:8c:ad:72:b4:67:e9:3c:d4:96: 16:bd:bf:7d:55:5c:f1:f4:0a:7d:a2:0c:11:ca:c9:59:92:cd: 44:37:f8:af
Step 18: Ping IP address 192.168.2.1
from DUT0
:
admin@DUT0$ ping 192.168.2.1 local-address 192.168.1.1 count 1 size 56 timeout 1Show output
PING 192.168.2.1 (192.168.2.1) from 192.168.1.1 : 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.697 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.697/0.697/0.697/0.000 ms
Step 19: Ping IP address 192.168.1.1
from DUT2
:
admin@DUT2$ ping 192.168.1.1 local-address 192.168.2.1 count 1 size 56 timeout 1Show output
PING 192.168.1.1 (192.168.1.1) from 192.168.2.1 : 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.571 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.571/0.571/0.571/0.000 ms