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.745 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.745/0.745/0.745/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.839 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.839/0.839/0.839/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 Feb 13 16:13:30 2024 GMT Feb 12 16:13:30 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 Feb 13 16:13:33 2024 GMT Feb 12 16:13:33 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 x509 csr CSR 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 x509 csr CSR 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, 80ded075593786ee_i 890cc9d9d83ea324_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 1s ago, rekeying in 19580s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 1s ago, rekeying in 16277s, expires in 31679s in cc68ef47, 0 bytes, 0 packets out ca7e357a, 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, 80ded075593786ee_i* 890cc9d9d83ea324_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 15082s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 14628s, expires in 31680s in ca7e357a, 0 bytes, 0 packets out cc68ef47, 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:14:13:d8:67:82:3e:e3:39:6d:9e:00:00:00:00:14:13 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 13 16:13:33 2024 GMT Not After : Feb 12 16:13:33 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:9b:01:e0:ba:bb:46:44:63:fc:7d:d3:3f:c9:5d: f3:1c:e5:6d:84:e6:79:df:12:86:12:e2:39:80:dc: cd:55:d6:57:9d:1d:88:3f:ce:64:e7:32:d1:b3:4a: 2b:f9:ec:ad:83:aa:4a:74:9e:f0:93:10:76:4b:ba: c4:3d:63:dd:59:6d:c4:33:87:6e:40:a0:63:53:12: 69:88:a2:2a:09:64:e2:32:a8:29:9c:13:a2:14:d7: 09:6b:e4:98:39:bc:f0:0d:1d:40:5e:ff:20:e5:bc: 8f:ce:37:4f:3c:60:e1:6d:8d:d8:2b:b9:f2:46:72: 5a:1d:83:70:74:9d:f0:c1:00:72:67:9a:04:dc:10: cc:fb:dd:82:98:82:9d:ce:b7:a7:33:0b:c0:3f:bf: eb:c5:b2:25:c2:43:26:e3:ed:fd:a2:bc:64:03:d7: 57:12:4a:a2:6c:02:bc:3f:87:57:64:a1:7e:a5:6c: a0:da:49:e8:9d:12:b9:01:d9:13:44:7d:7b:2d:c8: be:a1:ac:66:89:71:84:dd:54:80:26:1a:7d:73:25: 43:f6:90:2e:1e:78:41:b8:81:0d:4d:b7:d0:d6:4f: 8d:1e:84:e5:93:b8:6b:a7:98:41:14:62:93:d5:60: eb:02:81:c4:68:c4:fc:20:99:ba:aa:95:8b:15:7a: 1a:73 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: DD:C2:6C:43:90:44:95:13:A0:37:88:33:6D:51:B2:EC:39:13:C3:74 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 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 11:7b:48:d7:16:59:c3:03:5f:7c:7a:a9:2a:3d:0e:b2:a6:81: 7c:96:0f:31:08:5c:96:fc:59:62:61:2e:de:be:ca:d3:82:5a: 5e:5d:68:00:2f:d9:97:ab:6c:05:f4:40:1f:5f:ad:36:e5:54: 6d:24:e6:a1:c9:9a:b1:91:e2:99:36:50:e6:60:3c:43:a7:d8: 81:ce:51:17:d4:27:3f:f1:17:9b:a6:49:cb:80:6f:68:af:6f: 17:07:7d:1f:02:83:4a:8e:84:fc:80:97:d6:a0:66:7e:81:a1: 2f:28:ac:34:95:de:58:e8:8e:92:47:01:ce:18:77:56:db:e2: bc:b8:84:2d:17:c1:46:23:be:1f:7d:df:1c:cf:69:4b:7c:17: 92:1e:b2:5a:37:ea:ad:a1:92:d3:37:5f:be:c5:f2:45:42:61: 13:36:9d:ed:2f:cf:6e:67:97:77:b8:1f:e4:4e:6a:81:a6:8b: 57:8b:f2:40:3f:bf:f6:3f:60:ae:36:ad:d5:dd:73:d2:13:c8: ac:f0:56:93:14:12:18:10:0c:3a:3c:e6:3d:a0:bb:ae:68:e7: f0:4d:3a:1a:da:ee:8a:d2:b9:9c:dc:da:01:1b:3b:cd:a2:0a: cf:25:cf:61:a8:3b:4c:66:97:2d:05:18:60:6d:96:7b:27:88: 6a:89:90:35
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:14:12:13:70:f5:33:4a:b2:70:78:00:00:00:00:14:12 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 13 16:13:30 2024 GMT Not After : Feb 12 16:13:30 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c6:74:ef:38:59:85:47:85:fd:94:b8:94:14:ed: 8a:15:53:84:ac:ed:20:db:14:5a:5b:ad:5a:8c:e9: 90:82:7f:db:ba:f4:88:cb:76:a7:95:54:85:e2:30: ef:f9:83:c5:6f:35:96:2c:d5:50:15:6f:6f:4a:e2: 3a:96:da:6f:48:90:ec:e2:07:f5:d2:91:12:63:76: 55:a6:15:51:e4:ac:57:d9:83:b5:f1:0d:94:04:e4: 80:be:f1:9e:13:65:8b:c4:4e:bb:e0:87:03:6c:c2: 61:85:03:e6:88:71:af:f4:40:8b:81:72:dc:20:82: 59:5e:7a:f2:6f:65:c9:a4:66:3d:ca:e6:3e:dc:0b: 94:4b:1f:c1:55:c2:33:86:60:5d:4b:cb:51:61:cd: e1:3d:a8:24:0b:a5:b7:fb:84:84:85:38:67:b8:44: e1:31:bc:21:e5:8f:03:51:c6:4d:df:47:10:94:0e: 95:52:c1:e5:78:7d:01:82:22:f3:6d:b2:54:49:6a: 21:be:b1:dc:e1:ed:60:73:23:c4:03:69:84:f4:61: 80:f5:f9:f0:6a:25:91:b0:1b:e5:59:66:a7:44:54: 5f:81:ba:a1:bf:3e:fe:27:fe:d0:0b:67:1c:fd:b9: e0:0d:cf:48:ed:b4:bb:0d:66:9d:19:e8:d2:55:5e: fb:4d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: B5:F0:40:9C:04:4E:5C:8C:C3:89:7A:63:90:E7:10:6F:31:A5:6F:05 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 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:97:2d:19:1c:54:c4:b4:46:54:a3:40:f7:62:33:70:06:cc: 09:36:30:61:42:dc:c8:57:42:95:f2:c7:bb:69:5e:27:3b:81: 10:ca:0f:b7:be:5b:df:cc:35:01:d6:c5:f6:c7:dc:9e:98:3d: fc:78:3c:b2:6f:3f:7a:f6:d2:b4:ee:c7:2f:40:6d:78:10:7d: 50:f8:72:20:e5:6f:21:7e:89:20:7e:8c:0d:9a:34:fc:cd:bf: 91:ca:cb:f2:92:a8:f4:0e:74:f7:71:8f:a0:b5:2b:01:78:9d: 24:53:1a:e5:ed:fb:87:44:cc:b9:a5:5c:b0:35:5e:07:ea:c1: 55:6a:45:fa:e3:29:a2:e4:b1:1e:0d:fc:c2:5b:5a:5d:54:07: b5:04:16:2f:2e:cb:13:21:5a:47:05:ee:63:97:38:4a:34:fe: 26:55:19:76:50:5e:73:9f:13:74:26:f7:cd:47:a0:0e:77:e9: 17:7f:c5:07:16:24:f0:1e:7a:de:7b:43:26:06:3e:7b:59:6c: ff:16:b3:43:41:b7:84:70:a4:ba:2f:ae:9b:e0:c5:f1:ab:a3: 80:72:07:8f:8c:a7:ba:f9:2d:2f:25:f4:f6:bd:8a:2e:79:13: 20:00:43:69:2c:5a:7a:97:71:7b:39:93:0a:b4:1e:a0:83:2f: bc:17:e2:ef
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.654 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.654/0.654/0.654/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.640 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.640/0.640/0.640/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.699 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.699/0.699/0.699/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.637 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.637/0.637/0.637/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 x509 csr CSR 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 x509 csr CSR 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 Feb 13 16:14:53 2024 GMT Feb 12 16:14:53 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 Feb 13 16:14:59 2024 GMT Feb 12 16:14:59 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, 31c43e088ff55d04_i cc6a8fb9b3c4a501_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 19819s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 16311s, expires in 31675s in c2d9b8b3, 0 bytes, 0 packets out c8de2f66, 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, 31c43e088ff55d04_i* cc6a8fb9b3c4a501_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 28732s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 25159s, expires in 31675s in c8de2f66, 0 bytes, 0 packets out c2d9b8b3, 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:14:15:06:5e:43:9b:6e:6f:b5:44:00:00:00:00:14:15 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 13 16:14:59 2024 GMT Not After : Feb 12 16:14:59 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c6:c9:b0:cd:a4:ee:1f:35:54:2b:23:b6:8b:7f: 1e:6d:3e:4b:0f:19:a1:bb:d4:cf:3e:f2:f9:4d:dd: 40:a5:66:ca:d6:3b:22:2c:e6:70:ec:4b:61:12:eb: bd:65:6c:53:f0:65:a8:3a:1d:04:e6:d9:37:46:00: b8:e2:0a:85:f6:61:ba:2a:1a:d6:4c:4a:50:d5:10: 19:58:c7:57:96:f0:a7:1c:d8:37:90:a0:53:7c:38: ff:26:aa:61:32:4c:3b:20:31:65:d7:8a:68:25:af: 73:5c:ba:f6:7e:54:ea:13:d5:9a:15:c4:18:c2:8f: d1:05:f4:e2:dc:51:67:01:c9:24:50:5a:53:26:38: 09:da:9a:f2:32:5e:e4:f0:1d:c6:71:73:7f:57:f0: 32:f5:46:ef:4b:30:4f:3b:b2:51:0b:d2:06:d1:d2: bd:09:bc:80:d5:ff:53:29:4e:c9:a6:1d:87:57:fe: 7d:8d:c2:cf:92:a2:f1:14:8c:13:41:c8:e5:5c:8a: 84:81:52:97:50:d6:24:5a:4e:3c:e0:2d:d1:7d:83: a4:93:2c:a3:4a:3d:fd:a4:12:08:ab:6f:be:8e:dd: c5:88:9c:eb:3f:cf:e0:77:d9:99:70:57:6e:56:4c: 81:bd:c6:7a:47:ea:b8:e0:28:23:e7:c7:8c:cf:aa: 82:c9 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: D5:6C:72:3E:F4:87:A3:3E:6B:B5:F3:C1:7B:51:DD:EF:4B:18:B2:84 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 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 6c:ba:01:eb:d9:b7:aa:fb:de:b3:57:ad:39:86:e5:59:20:b7: 90:a2:39:dd:11:67:d7:90:fe:79:55:2f:07:e3:40:1f:27:0b: b2:95:95:3d:91:47:a6:f9:c8:62:51:f3:c9:3d:39:5f:bf:e4: 8e:2c:fd:e9:c5:aa:23:7f:7c:ac:3c:ae:26:8f:76:89:16:e4: bf:d5:3e:7f:ad:a1:df:e0:c3:39:6d:60:cd:ca:9b:ad:0b:0f: b8:44:16:dd:4a:54:e4:c5:df:4c:ae:f9:86:10:a7:f1:eb:1c: fb:c1:89:76:ac:20:59:34:46:5a:00:79:26:28:01:76:3f:04: 97:17:1a:02:07:bd:88:39:1d:b3:04:aa:0b:e8:31:4f:5f:d7: 8e:63:d2:aa:46:ef:0b:fc:37:e1:97:68:fa:7a:67:83:71:36: 75:12:ed:20:3b:f8:78:87:be:a0:5c:17:07:06:0d:be:01:bd: 47:cc:4d:37:7f:ff:75:e8:1e:e1:cb:d6:c2:31:7c:e7:2e:55: 0e:bf:e2:70:8c:21:75:d2:18:be:57:fc:c7:5b:d7:b9:52:06: d0:31:ec:98:41:2c:6d:98:5d:df:bb:93:50:70:80:9e:b3:66: 72:01:b8:eb:8b:0a:d4:6d:cd:1d:4f:0a:d3:4e:5f:0f:b9:68: 5d:52:6e:28
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:14:14:2c:22:8d:a5:ab:7f:4b:7c:00:00:00:00:14:14 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 13 16:14:53 2024 GMT Not After : Feb 12 16:14:53 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:be:3c:8f:9d:db:65:d6:21:f3:89:4c:76:31:4f: 86:0c:e4:25:61:d9:c7:a7:db:70:a6:48:f2:7a:1b: ab:ad:41:4e:21:e4:64:96:17:2e:8a:05:ae:c6:7e: 70:ea:26:fd:86:a0:d5:3e:aa:1d:59:b7:e2:d5:15: e0:34:90:ca:a9:55:3d:68:64:1c:6c:9d:2b:01:3a: ec:37:f5:c1:82:b3:df:e2:d9:bc:ff:00:7e:d4:92: fb:cc:23:85:5b:47:bd:34:92:20:19:e4:35:cb:da: 75:5d:0c:7b:4f:3f:16:d9:6b:55:58:4a:b4:60:f5: 4f:50:66:08:ca:5c:8e:c9:01:93:8e:95:0b:be:8f: 46:62:11:ea:7a:3f:2b:93:cf:28:4e:7a:ba:ac:d2: 31:4e:de:5f:e9:11:02:73:9d:b0:b0:fc:0a:d5:9c: 4d:b2:9e:22:74:f4:f2:dd:c3:50:f8:38:b5:bf:fe: c7:6f:c2:e7:f9:5e:47:ef:68:b3:e4:ec:19:01:a9: 1d:d8:79:57:d7:ae:c8:8c:55:ce:0f:28:2d:21:16: e7:f6:52:76:b3:61:f2:9e:ec:34:8a:54:62:4d:91: fc:13:ee:df:71:b7:41:bc:20:bf:4b:fa:fd:34:f5: cf:5c:c9:65:93:99:0d:1c:9f:cc:72:54:07:29:e9: 84:0d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 27:05:38:1F:98:B2:A6:16:65:81:BC:6F:C7:E1:9A:23:22:8E:ED:55 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 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 ad:14:b6:52:79:e0:f8:35:e0:a1:01:3d:11:3d:0e:41:c2:03: 09:64:36:60:46:b8:48:0c:fa:46:56:76:c6:69:b8:c3:18:7c: dc:d2:43:c6:7c:cf:85:ce:12:67:3a:fb:59:68:e6:8d:68:8f: e8:21:ff:77:3b:00:7f:0a:4c:44:45:51:4a:5f:87:f2:79:b7: ae:4d:01:1b:40:fd:ad:5d:27:1f:88:8d:4d:85:0e:78:08:b6: f8:5f:82:97:32:cc:9e:d6:4f:30:db:bf:bd:63:50:b1:15:13: 28:c3:55:34:95:cf:81:1c:6a:7d:37:3a:58:e5:55:c6:14:8e: 63:f8:b2:8c:17:97:24:a6:6a:09:50:b6:e1:66:25:03:a4:4c: a6:ce:92:7e:38:35:d6:82:c2:68:13:68:57:71:b4:79:35:b7: 63:01:70:6d:18:14:cb:47:fc:71:80:73:e3:3b:bd:6e:4c:ad: 0a:9e:4f:d4:9e:07:61:91:84:99:77:6f:26:1c:64:08:26:9a: 22:f1:7f:59:42:1f:90:da:ee:46:a6:89:0c:a5:08:30:2a:90: 4e:69:e6:7a:44:5b:42:93:1a:2a:b3:21:b1:38:76:33:ba:41: 2a:b7:45:90:df:8d:83:0f:cc:92:de:76:03:cb:6a:2d:60:c7: 34:6b:39:75
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.842 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.842/0.842/0.842/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.689 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.689/0.689/0.689/0.000 ms