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.730 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.730/0.730/0.730/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.504 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.504/0.504/0.504/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 Jun 13 00:21:48 2024 GMT Jun 13 00:21:48 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 Jun 13 00:21:51 2024 GMT Jun 13 00:21:51 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, a330a5e8beb81cf0_i 872e596d9fe8e5a3_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 28519s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 15921s, expires in 31680s in c4696d3c, 0 bytes, 0 packets out cd7cdb27, 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, a330a5e8beb81cf0_i* 872e596d9fe8e5a3_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 1s ago, rekeying in 23700s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 1s ago, rekeying in 25649s, expires in 31680s in cd7cdb27, 0 bytes, 0 packets out c4696d3c, 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:3b:0b:80:71:0f:32:9a:b5:c8:d5:00:00:00:00:3b:0b Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 13 00:21:51 2024 GMT Not After : Jun 13 00:21:51 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:b7:a6:65:1e:ce:43:56:7c:c7:98:34:d3:81:87: 04:de:c7:03:1f:6d:9b:e9:39:35:93:4d:d8:22:30: 25:f5:db:5d:df:d4:f1:71:77:90:25:a1:8b:f5:71: a6:7f:5a:06:e9:78:e9:c3:69:c3:8a:b7:f3:de:2c: 94:97:30:6d:94:76:dc:91:4b:c3:ac:40:e9:61:50: e2:ed:58:f2:e7:be:4f:fb:f4:88:e0:a5:c4:4c:3a: e3:d9:1f:e6:64:06:f6:ce:ca:44:f7:25:da:0b:0f: 42:b5:14:86:f8:e8:c3:c1:df:0d:7e:53:11:15:fd: 98:8f:14:03:c5:0e:76:52:cc:fa:ed:aa:a4:c2:ca: ed:89:48:92:c4:5e:f3:08:db:2c:04:28:47:76:e0: 5a:74:b5:44:41:18:25:a8:56:78:ae:dc:e0:08:2b: db:6f:54:f3:36:b6:dc:77:e0:7d:b4:33:9a:48:ed: 71:63:26:a9:dd:cb:27:1f:0f:11:84:c1:50:a8:d7: 57:22:65:93:37:67:4f:9d:b6:db:8c:b6:4d:ab:05: e2:5c:b0:fd:bf:92:a3:a3:5d:28:ba:11:fd:6a:00: b9:91:1f:31:e1:44:b5:de:eb:87:33:77:cc:bc:cd: 26:33:7d:0a:6b:f9:aa:5e:a3:7f:ea:68:0a:dc:8f: 4f:e5 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 63:65:28:68:99:87:A5:64:9E:75:29:16:F6:4A:3A:96:98:45:6B:1C 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?certificateRevocationList?base?objectClass=cRLDistributionPoint URI:ldap:///CN=scep-TELDATPKI-CA,CN=TeldatPKI,CN=CDP,%20CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=srv,DC=lab?certificateRevocationList?base?objectClass=cRLDistributionPoint 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 0f:33:02:02:0f:c3:ef:1a:f6:ab:db:80:ee:3e:22:03:39:42: a7:78:73:13:e7:75:74:88:5b:9c:0b:58:36:8c:24:e6:6a:dd: 42:01:6c:df:0b:1d:ce:7f:df:a6:2e:67:8e:42:48:c5:59:26: 2a:13:47:59:cf:b1:69:ad:9b:3e:0f:cf:6b:9e:f8:44:2a:81: bc:00:ba:b4:17:79:4c:37:80:20:c7:26:9a:fa:6a:cf:18:28: 42:a3:8d:e1:a7:01:09:a4:b0:70:97:c7:b0:0f:84:88:c4:f7: 9f:90:29:81:29:bf:94:cd:0a:56:a2:1a:f2:92:61:c2:b3:62: cd:3d:45:b5:25:ba:3f:f4:e7:a3:40:38:7d:32:d8:4e:d7:1d: 28:26:25:7f:2d:6e:37:ca:f0:1c:9e:8e:99:ae:69:fe:88:d0: 57:85:31:da:88:06:d2:f7:aa:bd:19:ec:ae:0a:14:af:45:f2: b3:e6:2d:6f:75:7b:27:b9:d2:f9:87:8b:7a:0a:8d:b4:9e:55: b8:5b:e6:4a:3d:2c:a0:1e:52:28:76:0a:49:6f:e2:dd:be:86: 40:38:20:5e:e6:0f:80:b0:c0:d0:32:93:5a:b3:94:ac:fc:81: 1c:ed:97:96:2f:94:b0:14:eb:a0:ff:0c:77:61:98:43:25:97: 76:a3:6d:8f
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:3b:0a:e5:42:bb:88:35:eb:2a:42:00:00:00:00:3b:0a Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 13 00:21:48 2024 GMT Not After : Jun 13 00:21:48 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c4:8f:27:ad:99:d9:6e:7e:97:86:8e:67:ba:7a: 9c:bb:45:aa:a2:74:23:d9:84:49:89:3a:4b:7f:64: fc:23:40:cd:11:55:c0:06:f1:4f:b1:f2:b8:3f:13: 2c:ab:09:29:c4:d3:90:b6:40:75:ee:9f:ef:2f:b4: b2:b3:90:60:f5:48:9f:b7:51:96:49:87:30:ee:48: 41:77:16:bc:07:25:64:f5:0b:54:2b:7d:c8:93:5f: 5f:a4:6e:25:88:98:ec:9e:cf:9b:20:73:98:45:51: cb:b0:05:75:f1:47:05:e0:23:ca:cb:a9:95:07:22: 0f:63:67:a6:e1:32:b4:d2:19:3a:a7:b0:8c:9a:9f: 52:42:59:e8:80:de:37:40:12:04:9d:bf:c1:8c:d7: 41:45:4c:58:80:6b:d8:15:ec:29:03:a2:d5:69:7d: 57:5d:70:70:c0:59:6b:e0:ca:b3:28:69:95:da:b8: c2:1d:22:1e:6e:9b:6c:e8:78:80:1b:9e:bb:be:58: be:c3:7d:b4:5a:7d:aa:45:4f:dd:7c:16:43:84:08: 5c:62:be:8d:3f:8d:c3:da:8d:46:60:66:bf:e3:4f: 55:9c:ee:22:44:d7:19:b9:62:87:f2:71:56:c9:a4: 66:93:0a:36:91:91:66:5c:18:a1:74:e9:a2:3f:e0: 14:3f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 41:93:F1:80:02:5C:3E:E8:C0:F6:68:1F:4E:68:C6:65:2F:B5:24:B6 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?certificateRevocationList?base?objectClass=cRLDistributionPoint URI:ldap:///CN=scep-TELDATPKI-CA,CN=TeldatPKI,CN=CDP,%20CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=srv,DC=lab?certificateRevocationList?base?objectClass=cRLDistributionPoint 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 1f:f1:f5:6e:bd:d5:df:99:b7:99:70:6b:1b:f7:72:cc:64:49: 40:f2:e3:51:32:5d:5e:08:1a:98:d1:2a:23:f1:89:de:c7:88: 1e:c1:29:38:30:8f:e1:3d:a9:45:82:49:b3:c7:fa:a6:ee:d3: b5:a2:18:ee:71:ea:79:35:7f:bd:01:a1:c3:6f:cc:cd:d7:b0: de:6f:9a:1c:22:fe:3d:19:35:f3:58:27:3a:f8:eb:21:13:3a: a4:67:a2:99:81:26:08:03:5b:96:bd:a4:37:4e:86:fe:e6:d3: fa:b7:7e:f3:1f:55:60:a7:24:07:28:e8:40:6f:68:de:c4:ec: 21:09:45:4d:46:a9:28:0a:d4:e7:da:3b:8b:90:16:0b:9a:71: 66:5e:18:dc:19:7d:d3:dc:e0:e1:71:1d:c0:0c:19:f7:6d:04: 8c:41:98:4b:1a:a1:18:db:6c:0c:cc:0a:40:07:19:6b:ff:df: db:fc:db:87:6c:17:b3:6b:6a:15:00:d2:f1:e6:7c:f7:b5:2d: 74:7f:bf:54:87:f4:b0:c1:bb:04:1e:89:02:06:03:62:25:bb: 81:b1:b2:6b:55:3f:34:85:4d:23:62:2b:9a:d7:8b:3b:b8:8d: d3:6b:f8:b4:1a:ca:63:9f:fa:47:e8:b9:87:3b:82:14:c5:92: a1:ad:ff:62
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=0.568 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.568/0.568/0.568/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.831 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.831/0.831/0.831/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.756 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.756/0.756/0.756/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.707 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.707/0.707/0.707/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 Jun 13 00:23:07 2024 GMT Jun 13 00:23:07 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 Jun 13 00:23:13 2024 GMT Jun 13 00:23:13 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, 77f1309d7a6ac8de_i 3bb1d7ea476aaec3_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 5s ago, rekeying in 23301s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 14962s, expires in 31675s in ca95a4dd, 0 bytes, 0 packets out cb87cda2, 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, 77f1309d7a6ac8de_i* 3bb1d7ea476aaec3_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 5s ago, rekeying in 21957s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 16336s, expires in 31675s in cb87cda2, 0 bytes, 0 packets out ca95a4dd, 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:3b:0d:eb:30:48:81:e6:2c:be:da:00:00:00:00:3b:0d Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 13 00:23:13 2024 GMT Not After : Jun 13 00:23:13 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:91:05:b9:9c:0e:92:c5:1c:09:ec:bf:67:03:30: 77:8a:6a:81:c4:f2:5a:52:0c:f6:81:5d:cb:55:e5: 8f:36:3e:7e:47:28:a1:fa:37:33:14:6d:15:18:d9: 06:aa:5e:47:ee:de:73:bd:ad:77:4e:17:11:46:a9: d5:ed:67:88:60:0f:f4:bd:64:b2:07:bd:cc:34:e8: 54:65:e7:68:fb:7a:a0:b3:a2:53:67:9b:b9:57:fc: 4d:e4:16:1a:f0:4b:9e:64:a6:6f:ac:54:fa:e7:b7: a3:c5:28:9c:16:23:94:45:f9:b8:24:84:ef:50:e5: 12:8f:c8:2b:0a:98:89:57:3c:e8:ed:e6:cf:21:af: 08:e4:8d:92:99:4f:fb:67:1b:73:40:74:5a:92:c2: aa:86:b7:ea:b1:7f:5f:e3:6b:17:9a:6b:56:33:ee: 16:2a:9a:bb:a5:8c:5c:5d:ac:eb:5c:68:c1:b4:ec: 0f:fc:f9:64:70:45:9e:e4:9b:79:d5:b7:31:75:45: 10:c2:6a:f9:bc:be:7c:95:47:81:f5:a2:fc:0d:20: 46:81:fe:f0:a2:6d:95:c4:e5:ff:9d:a3:ef:1b:1c: c5:1b:e2:2c:ca:4f:5c:cb:62:80:9f:81:3b:31:99: 9b:3d:91:1f:3f:87:3d:e4:d0:27:bc:cb:be:b2:7e: e3:0f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: AD:26:FC:AC:FB:57:08:31:E8:E9:4C:8C:AB:FD:E5:19:63:F9:EF:93 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?certificateRevocationList?base?objectClass=cRLDistributionPoint URI:ldap:///CN=scep-TELDATPKI-CA,CN=TeldatPKI,CN=CDP,%20CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=srv,DC=lab?certificateRevocationList?base?objectClass=cRLDistributionPoint 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 a4:22:ed:d9:ec:25:02:32:09:8a:3f:23:96:1f:9b:a7:86:1f: 91:ca:1c:b9:8e:2b:14:32:97:02:00:55:76:38:3b:52:ae:eb: aa:d3:2b:91:7a:2c:32:2d:d6:63:c0:6f:21:78:9c:e2:18:26: a4:08:14:93:2a:bb:e0:52:36:e0:92:12:a8:0f:e0:28:21:5a: d3:4b:cb:fb:8f:04:db:71:81:5a:c1:6f:7b:56:09:6c:79:f7: d0:94:21:e2:68:68:c4:08:6e:3c:96:91:ac:e9:63:f5:5f:1a: 81:2b:a2:83:73:21:19:60:57:94:89:a4:d2:c7:39:0f:30:25: a4:9b:74:c6:42:9b:1f:80:43:c6:74:7f:9b:8c:1d:5c:55:d4: 0b:2a:17:8e:e1:56:13:5f:25:53:83:4f:54:06:9e:89:bc:44: 99:1c:d2:d6:f2:0c:9f:8e:ea:6e:ef:fe:f5:f8:36:5d:66:a1: 8a:b4:9d:0f:1d:66:eb:99:78:1d:a9:eb:e0:96:d7:7c:2a:e4: 1b:d3:51:c9:0f:b6:dd:11:1e:67:3d:47:8b:11:a9:91:34:f2: 1f:1b:1b:07:dc:7d:41:10:2a:2c:60:02:de:f1:e8:c5:c4:98: 48:ba:63:2d:d3:e3:97:42:b0:6a:6f:e4:cb:07:3c:6b:68:5e: 06:c1:70:c4
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:3b:0c:ce:2e:5d:85:b3:af:e2:40:00:00:00:00:3b:0c Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 13 00:23:07 2024 GMT Not After : Jun 13 00:23:07 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c5:b2:be:48:bd:e7:9e:f3:ab:af:33:b6:43:ff: 75:8f:28:96:63:3e:5d:09:3b:1e:69:9d:28:13:63: 5e:00:78:65:06:4f:f9:c0:e8:44:83:13:26:62:2e: 37:db:df:bc:19:25:6c:a8:7b:2e:49:79:ff:e1:34: fe:7f:0b:54:70:01:75:80:30:36:0a:d3:1a:bc:d8: 69:7a:cd:81:06:45:b7:3e:e4:57:99:59:19:35:a2: 3e:83:6d:81:b5:65:48:a2:37:b1:03:37:92:0f:e5: 84:31:2f:58:b6:7f:15:1d:60:95:55:09:4b:e3:34: 5e:98:25:89:ed:e6:01:ed:6b:87:12:b1:58:84:cc: 9b:64:6f:c4:09:ae:74:c8:09:1a:43:4f:f0:8c:f4: 1d:54:b1:96:d2:c6:3a:90:6b:e5:ce:fc:86:b1:f0: f2:ae:87:8d:1c:67:95:df:cc:56:bf:aa:d8:6d:f2: b5:24:57:3e:cf:86:ed:f2:1d:52:3a:7b:43:54:0e: e0:19:b5:01:16:09:11:48:44:67:e3:5a:6d:3e:e3: 06:e8:d7:5e:57:0d:b6:e4:e7:21:5e:1b:ee:c9:5b: cf:68:59:84:5b:3a:8b:f8:6b:11:f6:a0:90:34:53: 2d:eb:19:4e:16:5f:b9:eb:27:c6:0b:74:14:4a:ea: c0:85 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 7A:6F:EE:C3:D8:91:A5:9B:5C:09:71:F8:D5:AE:DF:F9:C5:B8:D1:57 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?certificateRevocationList?base?objectClass=cRLDistributionPoint URI:ldap:///CN=scep-TELDATPKI-CA,CN=TeldatPKI,CN=CDP,%20CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=srv,DC=lab?certificateRevocationList?base?objectClass=cRLDistributionPoint 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 62:70:f8:88:81:7e:b2:86:85:0c:b2:c2:1d:04:9a:0c:49:57: 68:56:00:3c:d7:af:88:da:ee:b1:bd:e8:8d:d2:ec:55:e4:93: 22:ad:6f:c3:bb:46:46:23:af:65:88:41:d3:46:42:b1:70:b7: f0:ba:60:9d:39:fa:e1:78:95:b0:9b:8c:cb:b2:ba:97:b9:21: 21:c8:02:f9:45:5a:98:97:9e:92:c4:5e:50:7d:6f:77:20:4e: 56:53:2b:ab:ee:54:62:33:2d:0d:a9:cd:5a:36:69:64:bc:74: c2:ca:4e:86:46:00:60:4d:10:58:e2:23:cd:f9:28:12:03:d1: 70:82:2a:87:8f:9b:1d:a1:14:7c:0d:9c:50:a8:a4:01:04:b0: d5:f7:7a:91:da:4d:f9:72:21:e0:ad:be:8a:75:ae:67:ec:3f: d9:23:32:cb:8e:30:a3:77:d9:f8:3a:21:c5:40:75:de:81:2e: 6b:f6:ef:15:70:9b:23:dc:32:6c:3b:7d:10:c3:04:84:a1:9c: 88:16:57:94:cb:4a:26:6e:8b:3e:0a:69:c0:ad:56:48:7a:f2: f6:d6:72:35:de:bc:b1:f5:a8:2e:cc:5b:1b:ed:07:99:05:e8: 56:13:2d:ef:3d:a6:2e:00:79:a6:74:c3:75:c3:63:c8:3a:2c: 7c:ca:61:00
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.742 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.742/0.742/0.742/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.584 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.584/0.584/0.584/0.000 ms