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.695 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.695/0.695/0.695/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.641 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.641/0.641/0.641/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 20 18:54:21 2024 GMT Jun 20 18:54:21 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 20 18:54:24 2024 GMT Jun 20 18:54:24 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, b2f4436350c83003_i bd0931ba803f1fba_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 23865s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 16472s, expires in 31680s in c85572e4, 0 bytes, 0 packets out c51dfb51, 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, b2f4436350c83003_i* bd0931ba803f1fba_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 27993s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 16207s, expires in 31680s in c51dfb51, 0 bytes, 0 packets out c85572e4, 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:3e:76:49:4f:fc:56:23:4f:0b:88:00:00:00:00:3e:76 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 20 18:54:24 2024 GMT Not After : Jun 20 18:54:24 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:a4:8a:ff:6a:fa:1f:42:24:08:f7:df:4b:f7:ec: c8:3b:ad:48:2c:2a:49:1e:41:72:72:3a:72:19:8f: ea:e9:de:18:e1:1c:34:ce:64:c5:50:f9:cf:d8:44: fc:ca:79:6d:74:13:0a:72:84:7d:84:97:c2:6a:79: f8:8d:c4:f9:41:c5:13:8f:7e:d7:56:6c:ef:b6:ef: 44:a1:8b:c6:89:4e:13:1f:47:50:6d:37:ee:02:d2: a4:cd:89:04:a5:e1:6b:ee:70:67:dc:6b:67:87:21: e3:6d:c7:21:b1:eb:50:14:dc:82:b1:6a:72:0b:a9: 35:08:d9:20:ab:2c:ad:fc:cd:3b:76:ef:21:ff:96: 40:68:e1:1d:41:3e:7c:b4:a8:4a:53:a2:96:90:51: 7b:92:31:36:50:19:88:76:b9:c6:88:9e:f2:64:fd: 59:3b:ff:a6:89:8f:a9:0e:19:cb:c6:9c:90:4a:db: 62:a4:19:b1:9b:87:66:bf:0a:bc:56:7b:d6:98:4f: 94:f9:fd:5f:77:f8:68:9a:03:b2:38:7a:30:ee:a0: 6f:2b:1f:f2:04:39:a8:f5:bf:fa:74:59:51:f2:1b: f5:8e:d7:8c:bb:4e:98:a6:47:90:b8:6f:14:57:25: c4:da:92:63:1e:da:f5:94:d9:b9:77:f0:9f:5f:52: 5d:bb Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 06:1D:04:6A:C9:C3:BE:B0:9C:7E:AD:62:41:36:7B:EE:93:07:3D:21 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 73:9d:4a:19:0f:31:a4:ee:87:f6:9c:cb:be:9e:3e:71:a9:2e: 37:28:39:27:d0:72:85:fe:65:28:ba:75:12:0f:05:9e:31:6c: 48:99:62:25:4f:73:d9:ec:1c:74:b2:3a:88:e4:bb:13:9d:c6: 11:a6:40:ee:41:db:b7:a2:02:48:23:d4:ef:a2:60:ed:ab:35: 6d:49:03:66:60:43:1b:d4:3d:2d:c5:54:66:e0:ac:97:3b:2e: 4b:45:fd:2c:d0:63:48:2c:24:06:51:8c:c6:61:eb:ce:7c:bc: 6a:1f:48:a0:55:74:6f:ae:d6:27:e1:b4:4b:e1:ef:23:9d:10: 75:6d:54:00:76:6a:3a:6f:fb:6e:ad:9a:57:c6:08:71:14:fe: 8f:60:4a:10:60:94:42:09:49:b6:1e:81:0f:fc:56:79:75:65: c5:29:29:d1:f7:4e:f5:2f:18:35:6c:2f:18:b6:0b:07:82:8a: 63:cf:58:74:f2:9b:df:9a:dc:eb:f6:a9:75:e7:29:a4:24:75: 99:e0:43:8d:7d:0e:76:82:d2:a5:ec:16:ce:a6:01:df:b4:0d: 45:3c:30:7e:f6:23:ce:7d:34:43:7a:b4:46:70:64:17:1e:31: bf:5a:3b:8e:e5:7f:d5:9d:e2:8f:49:09:58:41:48:fb:af:c7: 56:63:d7:aa
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:3e:75:54:06:b5:97:19:d8:d7:34:00:00:00:00:3e:75 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 20 18:54:21 2024 GMT Not After : Jun 20 18:54: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:da:27:13:73:a3:e6:2d:90:d1:4a:03:aa:98:c2: 02:d2:cf:bf:bc:4a:92:5a:a8:a6:26:3b:ee:8f:0a: bf:5e:5d:02:0c:4a:2d:79:20:74:7e:ee:54:35:35: 4c:59:38:8d:af:fd:1d:79:c9:c5:3c:70:2a:6b:d7: ed:3b:c5:4f:25:07:3b:d8:7e:3f:6d:e0:09:9d:28: f5:29:bb:a0:fe:f5:b0:d2:e1:74:98:bc:2d:67:b3: 48:85:03:d7:76:4e:ff:c5:1f:40:85:84:66:69:ab: a1:01:d2:be:91:3d:17:ea:ec:89:fc:cf:9b:b3:70: d9:4f:74:0b:fc:83:dd:af:5a:7e:e3:3d:61:68:ce: 80:28:2a:f1:31:98:2f:fc:ad:57:dc:32:f1:9f:ee: 8f:ca:62:fd:c7:ae:9c:f8:83:85:44:1b:c0:5f:54: 9e:0d:df:9c:f0:4b:0a:3c:14:4f:94:f2:69:fc:ca: f1:66:23:c4:ad:22:41:77:76:bf:99:b6:6b:4f:ec: f9:42:21:f9:15:35:ca:94:f0:cf:ca:d5:e6:9a:4f: 24:69:a5:63:1d:1f:18:76:dd:19:76:8d:53:3c:c8: a1:8c:b6:5c:a7:bf:d0:05:2f:b2:4b:a0:d1:38:05: ad:24:9e:56:96:b4:99:8d:e6:30:b1:4f:01:5e:ad: a2:c3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 14:55:4C:CB:5B:BB:AB:03:5A:1F:0B:C2:FA:EF:5C:11:70:E2:25:99 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 a5:ea:a1:2e:96:d8:24:9c:e8:b3:09:46:10:e1:1d:96:22:aa: 54:97:74:ee:95:b1:12:47:fc:f4:68:95:fb:fe:67:c7:b1:8c: eb:b2:13:ac:f7:60:cb:f9:33:cd:a4:26:ca:1b:6e:91:c5:bb: 6b:9f:fc:4e:3e:7b:23:d0:46:e4:03:71:4a:fe:28:a2:90:5d: 14:48:39:63:ac:96:36:67:fd:7b:e9:a6:a5:3e:a9:15:80:a3: 01:a7:db:ce:e1:9b:1a:96:fe:6f:0e:a7:82:43:77:b0:c2:d3: 29:c1:e7:55:83:6f:5d:c6:5e:04:e8:8a:7c:a8:ce:82:66:30: 36:a8:34:17:80:c1:18:8a:d6:ec:a7:9e:05:79:e2:c7:ba:07: c2:2a:74:75:30:65:b3:0b:14:35:6c:b1:36:c5:65:66:b1:75: b2:01:bb:7f:53:5b:4f:b9:67:d0:af:3c:f2:ed:25:4c:1d:48: e9:32:5e:f0:94:a9:86:44:a2:c7:0f:fc:69:a5:03:8f:67:52: f9:65:15:e6:8b:f0:7f:91:21:e7:23:be:b4:d9:1c:b8:7f:4a: 22:f3:47:70:05:c9:4f:b9:8d:c2:55:3c:a0:23:55:1a:0e:b4: 71:01:7b:a2:ec:35:be:a4:24:74:33:15:41:1d:37:fd:33:cb: 21:f2:fb:7e
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.533 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.533/0.533/0.533/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.826 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.826/0.826/0.826/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.742 ms --- 192.168.213.25 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 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.705 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.705/0.705/0.705/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 20 18:55:39 2024 GMT Jun 20 18:55:39 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 20 18:55:44 2024 GMT Jun 20 18:55:44 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, 294285d381a7d03e_i 0a5adaf8a044f4f3_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 20606s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 25967s, expires in 31675s in cde941de, 0 bytes, 0 packets out c945aa55, 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, 294285d381a7d03e_i* 0a5adaf8a044f4f3_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 26995s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 24556s, expires in 31675s in c945aa55, 0 bytes, 0 packets out cde941de, 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:3e:78:fd:ac:d5:c2:bf:49:52:69:00:00:00:00:3e:78 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 20 18:55:44 2024 GMT Not After : Jun 20 18:55:44 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:11:7e:f9:05:1c:5f:dd:f2:dc:e5:30:1c:27: fa:83:3e:67:12:b0:af:13:9a:57:de:b4:38:36:54: 98:de:eb:bd:c3:07:b5:53:c0:f6:21:2a:d4:fe:fb: f9:0f:2d:54:c8:7f:89:28:a7:97:bc:d4:1e:a7:df: 08:0e:e5:47:78:24:65:93:9b:f8:44:af:48:9a:a0: b9:5c:48:36:7e:13:18:ac:0b:0f:56:ba:e9:ea:48: 0a:a2:85:ba:28:09:ca:61:85:4a:2d:4f:7c:c2:34: 9f:5a:43:86:e7:64:33:a5:c6:b9:9c:46:15:8e:90: 57:2e:08:69:18:3a:17:c3:fc:49:fc:de:50:b2:68: a6:0b:ad:30:06:e2:92:1c:3f:03:82:98:c4:d4:92: 8b:92:07:22:38:f6:7e:20:f3:f8:d7:4d:0e:67:cb: 7d:98:47:23:f5:19:c7:b9:8b:e8:c1:a1:71:f2:3a: 7e:01:ef:2b:36:dc:98:c7:87:d1:ac:a1:97:9b:9f: 76:d3:95:df:35:c0:9c:ba:e0:2f:d8:a9:19:b9:3d: 4d:e9:de:4e:7f:8c:6b:99:50:76:2c:9f:4a:06:27: 1a:50:ec:4c:bd:d5:77:83:60:52:92:e7:96:66:a4: 51:d6:96:f3:68:58:71:b7:fb:4e:1c:43:74:d0:00: ae:5f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 48:7C:64:71:5C:CB:99:B0:B7:E3:86:99:0C:FF:1A:D9:2E:C5:5C:7E 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 b7:52:4a:b9:1c:ed:ca:5d:0e:d5:bf:d3:f0:4d:cd:a3:16:64: 96:9b:b8:2e:3f:00:cd:29:3c:5b:e2:cd:19:f2:6c:6c:b9:9e: 9b:01:e3:d4:c8:fb:b2:71:2f:41:17:53:38:b5:75:f3:8d:a4: 3c:20:8b:c0:5c:38:b5:7f:9f:b2:24:1a:f7:c6:15:bc:d5:16: 36:60:af:b7:78:90:14:1a:78:89:e3:ce:5f:0b:53:6e:bf:13: 18:36:21:bf:69:34:e8:dc:9f:f3:81:7b:b4:25:f0:5f:b0:ce: e0:8a:8d:a5:e9:94:58:7f:cd:36:98:48:d7:d2:ec:29:29:45: 33:14:24:34:6d:9f:08:22:a6:cf:bb:2c:4b:d6:98:6f:06:f0: 0d:b7:a8:70:6e:75:ff:ae:22:fc:bd:90:9e:f4:3b:43:57:d3: 17:95:38:42:90:c3:de:f9:8b:72:ae:b2:c1:8f:58:66:5f:18: f4:0b:8a:cb:27:3e:31:f8:aa:49:95:4a:9c:9b:9c:e2:ef:db: 76:7c:d0:cd:a0:ef:1d:ee:d2:ae:59:a1:ea:6f:9f:44:e2:49: 35:f6:24:ea:7d:c3:99:19:f2:9f:f2:e4:f6:c9:49:98:9a:09: aa:71:c9:b0:b9:18:b5:8a:a9:17:66:e1:9d:3a:9d:b1:00:d0: 0e:ac:c6:e7
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:3e:77:c3:7a:96:0f:27:89:16:6c:00:00:00:00:3e:77 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 20 18:55:39 2024 GMT Not After : Jun 20 18:55:39 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:d5:3a:6a:5c:ff:25:eb:cd:a6:7b:6f:87:9b:3d: 45:17:d1:48:5d:f0:22:a9:fb:18:7a:5c:78:9c:f3: 24:ee:0e:96:d2:ef:30:3b:d7:1e:6b:7f:d1:dd:53: 02:ef:ba:30:89:6d:7c:b3:d4:04:66:76:b2:31:f1: 27:1e:2e:ac:8a:a7:ec:f7:c1:13:f3:b5:ec:53:41: 70:df:db:a0:9d:1b:74:d1:a9:b2:33:7c:16:6d:2d: 99:00:81:b0:e2:1c:9b:5c:91:1d:0c:78:f7:9d:34: d1:08:3f:28:a3:6d:49:b7:34:89:56:25:44:b1:3a: a9:a3:b7:e8:2a:8c:e8:81:1a:46:e1:5d:50:49:23: ba:1d:1b:dc:24:72:8b:dd:61:31:1c:46:30:30:ee: 14:fe:79:38:e0:e0:cc:8f:57:1b:e9:91:9a:99:71: d4:97:e7:f9:5d:aa:40:90:ea:89:d8:2d:ae:08:ae: 84:a8:45:5e:48:9f:8e:87:84:f1:52:f4:0b:74:63: 77:d2:07:c5:da:46:9b:3a:eb:43:57:0f:ca:24:cb: 96:ca:f6:26:fe:c3:e4:f6:81:61:fe:5e:37:4a:0b: b3:e4:22:9d:80:7e:2c:fd:d0:9a:a0:e9:c0:a5:2e: 50:93:5e:b4:54:64:87:f2:c7:16:5d:ba:0f:62:f9: c8:55 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 0B:4A:B2:BF:0B:B1:64:A9:81:86:F6:F7:7E:BA:08:B6:FC:EE:4C:16 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:cf:72:14:b4:7d:af:4e:a9:cd:a4:4e:71:3c:c3:19:e0:ca: 05:6f:67:c9:20:b0:4e:f6:be:0a:1a:51:dc:ac:83:7a:1f:77: 29:2f:1c:73:c2:5b:99:b6:10:f2:42:79:53:8a:67:d0:e7:0f: b0:4e:78:9a:da:17:95:32:e2:e7:20:6e:7e:77:29:a1:d9:b9: 24:c9:c7:6f:e4:65:a5:7a:0a:b3:25:ab:c1:64:81:89:ca:1a: 88:e2:f5:64:10:39:a3:e1:2a:7a:75:1b:21:87:fd:fb:ec:02: 18:71:ab:23:cd:dc:9d:22:ac:5d:ce:47:6c:b2:1c:54:24:e5: 1b:c1:e2:c7:b4:0b:85:fe:5c:3f:fc:5e:ff:98:d0:0a:ad:43: 6c:1f:89:88:ae:33:93:c1:f3:cb:0a:6e:00:b4:e2:4b:45:dd: 1f:1a:6c:08:9e:a7:4b:f2:b0:2c:2e:8b:f9:b7:f3:6a:a6:c2: 57:c6:a8:94:48:e3:66:e1:cd:d6:f7:1e:c6:7c:a0:df:41:13: 5e:a0:ae:ac:07:9d:91:1a:49:83:10:93:7f:1b:48:c7:57:2b: c3:9e:d9:70:07:32:f6:f5:d5:f1:64:ae:56:6d:cf:92:b6:9c: 24:8e:e1:8f:56:16:f9:be:09:ed:ca:92:e9:a4:41:dc:5f:75: 1b:9a:18:91
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.727 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.727/0.727/0.727/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.852 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.852/0.852/0.852/0.000 ms