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=1.09 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.086/1.086/1.086/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.857 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.857/0.857/0.857/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 26 19:59:13 2024 GMT Feb 25 19:59:13 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 26 19:59:16 2024 GMT Feb 25 19:59:16 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, b7b5d690cfa7cd78_i 924159e0aecc0870_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 24627s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 18312s, expires in 31680s in c4a61ae5, 0 bytes, 0 packets out c22e437b, 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, b7b5d690cfa7cd78_i* 924159e0aecc0870_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 16844s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 14789s, expires in 31680s in c22e437b, 0 bytes, 0 packets out c4a61ae5, 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:18:4a:1f:52:5c:9e:c9:4a:6e:23:00:00:00:00:18:4a Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 26 19:59:16 2024 GMT Not After : Feb 25 19:59:16 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:d4:96:c2:40:0a:dd:36:30:b5:ba:6e:44:c1:6e: 55:d2:6f:5c:0c:13:37:3e:a7:c7:00:1b:df:2a:58: 54:ec:c6:2f:72:da:28:93:3b:fe:39:1e:6e:b8:c7: 00:1a:a9:71:cf:d1:2c:81:5f:80:79:af:ba:5c:25: 5c:ae:ce:29:e4:f7:0a:2c:70:9c:da:63:88:b5:c8: 16:7a:ba:a8:51:35:e3:75:60:f8:4a:8d:cb:18:12: 17:78:81:9f:e3:7f:28:ca:a9:1b:c8:ba:51:0b:65: 63:10:3b:83:01:ca:d0:e2:35:66:ef:75:77:62:e0: 00:72:55:da:ed:8a:db:cd:d0:1b:1c:2c:3d:74:1f: f0:42:61:ef:7d:81:dd:8a:40:ef:ab:18:c6:eb:a3: 45:71:a0:08:07:c8:68:de:72:e5:ce:0a:43:fd:92: 0d:04:af:de:72:c3:9b:bc:93:26:7a:c5:7a:b6:3d: e8:86:6b:3e:51:ab:68:8e:73:a9:dd:87:cb:e0:5c: 6c:c8:2f:01:e7:bf:5b:d0:81:84:a2:47:dc:02:ca: a8:ac:38:56:09:ae:6d:37:b6:cd:11:43:32:6c:9d: 88:30:a2:39:a1:25:df:e3:65:9a:6e:50:5e:85:56: 70:a9:01:8e:8a:d4:ca:10:a3:1c:4c:56:c8:e6:db: f3:2f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: B8:05:F3:7B:48:D7:A2:DD:3A:DC:07:6F:D2:98:93:D3:E3:E6:77:58 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 7f:36:40:4a:12:8c:3f:14:82:0b:e0:92:79:30:17:f3:11:24: 8c:c0:d1:8d:04:2f:b8:eb:bb:56:38:64:97:b4:92:96:ff:10: 25:af:19:a1:86:b6:ba:b9:c0:02:89:86:c3:fa:0f:ab:4d:c1: 44:ce:0c:08:ba:ea:8e:1b:0f:84:55:32:b8:7a:16:56:18:2f: cf:ff:bc:92:ef:8c:95:14:25:17:62:27:63:bd:5f:a3:d0:b3: 7f:78:87:d4:18:07:5e:32:d4:04:31:32:00:2f:0d:a9:a9:c1: 87:44:d6:d1:33:05:75:b0:76:ee:6e:75:9f:c1:4e:e9:61:a7: ca:8d:7c:4d:8d:18:a5:0b:38:6c:b8:ee:61:1e:d1:c8:ce:e3: c9:14:a6:fe:53:45:f5:f7:ea:aa:d0:df:9b:68:3e:a2:de:aa: b8:77:70:7e:a1:2e:0b:37:a1:54:11:c4:18:2b:db:aa:01:9a: 0f:f3:82:f1:c3:09:ea:19:ba:1b:26:f6:a1:ed:40:82:45:58: c9:71:25:90:3f:25:22:67:9d:73:f0:5a:06:45:a3:d9:dc:95: 30:df:43:b6:14:1b:67:11:4f:bf:0a:b2:1b:59:4f:42:33:e8: ac:63:5b:4d:6d:92:62:97:ee:91:1c:0b:8c:88:c3:59:8b:1e: 4c:20:50:b0
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:18:49:98:de:82:c8:87:c8:b9:0d:00:00:00:00:18:49 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 26 19:59:13 2024 GMT Not After : Feb 25 19:59:13 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:bd:c5:18:0a:f4:f7:19:aa:71:6c:c4:91:10:08: 5e:c2:e6:48:b7:c2:84:0b:3a:c5:b6:93:19:bf:d2: ac:50:41:cb:dd:e9:42:1b:dc:31:71:a0:ca:1c:9d: 0d:39:cc:ef:cb:bd:83:b0:7c:6e:a5:d4:32:1c:2c: cb:72:67:d9:35:6e:c5:67:6c:f1:d1:70:a0:35:3d: 31:54:2d:95:70:1c:be:ec:e2:ff:65:28:3e:aa:0b: 25:f8:d6:91:36:9a:3c:a7:ae:5c:53:2e:59:d7:9f: de:de:42:3d:e2:64:7f:f7:d8:43:88:9e:16:50:bd: c5:6e:89:5e:32:57:89:58:de:ba:ef:20:b4:9c:06: 06:60:7a:8f:b8:d8:68:f8:11:4a:8f:b2:fd:39:cc: 46:81:70:d4:28:0a:54:cf:78:14:b1:c1:e9:4d:4b: ee:55:a2:b7:bb:d6:58:da:40:26:de:39:5d:ec:07: 6d:62:75:1d:d1:67:3b:f7:0e:1d:84:cd:42:49:da: e6:f3:ff:94:16:14:58:d5:73:d6:5e:d9:35:5d:75: 23:84:9a:50:f3:ad:c0:7b:6e:69:c8:81:63:60:35: b0:59:b6:fb:1c:d6:a2:b6:3f:f2:42:20:cd:c8:6f: 15:b4:fd:f9:3e:ec:66:3f:d3:d8:62:35:85:78:94: b2:6f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: CF:AB:E2:AB:7B:26:E4:99:3F:CF:E6:88:5C:95:C1:EC:15:7B:20: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 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 9d:3e:85:95:ba:f4:6e:9e:26:6d:d4:7b:b4:d9:f4:35:69:9a: 68:5f:6d:13:f2:c5:9d:1e:d3:89:f0:93:5f:28:7e:7e:d9:8e: 83:af:e6:bb:35:f7:e9:9f:1a:22:1c:96:96:93:5e:47:62:fc: c3:a0:46:36:d8:33:06:fd:38:26:18:68:10:03:10:05:3b:70: e8:68:41:b9:82:3b:9f:10:a0:4f:3b:77:5e:ad:79:15:05:d2: 5c:17:23:b0:e7:7f:8d:78:b8:43:31:32:33:d1:e7:2d:12:77: 7c:65:96:8b:24:8a:82:6b:f8:d2:e6:2d:22:21:31:1b:35:c0: 2e:59:61:c2:b0:10:ba:68:08:37:11:23:10:bd:3c:7c:eb:3f: 34:11:49:d3:1f:fd:d6:83:1c:f9:b3:c2:43:d4:9b:31:43:1a: cf:ca:40:8b:d1:27:ef:79:27:df:d0:a8:e8:07:39:04:de:c5: dd:27:0b:8a:05:50:52:58:ed:6e:78:a6:04:19:95:13:9e:31: bb:fc:87:7f:58:bf:d9:60:28:30:35:a5:b0:72:82:6f:87:b9: ea:d7:04:87:a2:33:1c:cb:46:e0:01:b4:0a:79:81:b9:69:10: ce:a5:79:55:74:b6:b4:72:fc:26:bc:94:d2:98:df:5f:bf:38: 46:bd:2e:52
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=1.13 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.132/1.132/1.132/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.915 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.915/0.915/0.915/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.939 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.939/0.939/0.939/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.829 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.829/0.829/0.829/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 26 20:00:32 2024 GMT Feb 25 20:00:32 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 26 20:00:38 2024 GMT Feb 25 20:00:38 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, f1985cd125d72ac9_i 2b521fc522f11f08_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 22426s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 20690s, expires in 31675s in cbb8889c, 0 bytes, 0 packets out ce0ef5ea, 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, f1985cd125d72ac9_i* 2b521fc522f11f08_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 19793s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 18552s, expires in 31675s in ce0ef5ea, 0 bytes, 0 packets out cbb8889c, 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:18:4e:7d:e2:0a:35:14:14:a5:bf:00:00:00:00:18:4e Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 26 20:00:38 2024 GMT Not After : Feb 25 20:00:38 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c2:9a:25:0f:88:14:51:7e:9f:7b:e6:38:f8:cf: 91:e2:a2:d4:65:bd:9e:55:9e:82:86:28:16:2a:ee: cf:ca:fb:fc:20:e8:8c:38:74:23:d9:81:29:8e:cf: 03:12:32:6d:7d:dd:1f:18:e3:ff:fd:d9:c3:c3:c0: ac:de:42:9a:ef:30:20:5e:52:f6:82:56:e3:d8:30: 93:3a:5f:2d:45:de:a9:6b:5d:8f:71:72:cd:ee:30: 98:4c:02:2d:20:22:c8:e7:8f:63:b5:17:69:21:02: 23:58:51:a9:4d:3f:0c:46:80:e7:7d:20:24:5e:4c: 7c:52:59:b6:f5:6b:ee:97:40:7d:5c:94:c7:13:20: 41:77:42:05:fa:d5:d2:b1:cc:c1:9a:62:1e:03:77: 26:67:72:0d:b1:ba:9a:17:32:8b:e9:13:cb:e2:dd: ae:28:21:7b:ca:3c:a3:b6:0d:6f:13:ec:7b:85:01: 5b:ac:52:1a:35:71:ef:66:ee:ba:de:48:c5:f1:69: 28:e6:99:12:2c:f0:41:af:2f:bc:87:50:9f:d5:19: db:d9:e2:8d:33:01:2d:20:b9:7f:5b:2f:aa:9c:a8: 66:69:f0:d2:7e:ec:68:39:e5:24:5c:cd:ec:89:98: 96:7a:30:82:17:72:36:7c:35:a7:1e:12:5c:65:85: eb:3b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 5E:8F:4E:65:A4:35:4B:3E:74:76:C5:67:BF:B0:40:3B:9B:4A:CA:6F 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 05:06:8b:71:cc:a7:ab:49:07:cb:db:67:d1:a2:38:21:e6:9f: 51:3c:53:84:b3:ed:cc:74:4a:b8:b5:50:a6:db:a5:7d:6f:ab: cd:6f:cb:a3:5d:87:a8:a5:28:2a:fd:a0:56:37:5e:66:ad:20: 7a:78:ce:cc:85:14:52:c5:26:03:5d:f6:71:97:84:45:f5:b6: 4c:8e:f6:93:8c:e3:09:08:b8:03:78:76:f8:14:15:46:1a:b3: 37:00:89:c1:b4:0e:95:0c:e4:45:68:0f:b5:68:db:d8:9e:0b: 19:9d:71:0b:12:6c:ec:ad:58:59:8f:08:81:09:8b:11:d4:8e: 4b:42:39:41:98:5f:5f:44:98:90:21:d9:30:40:ca:e8:96:e0: 68:65:89:0a:d6:61:22:24:82:b9:11:6d:74:2e:ad:27:5e:fe: 44:c9:46:39:c3:48:0d:bf:2c:22:89:f8:75:c7:28:1f:2f:58: 0c:72:36:63:0f:13:9c:47:a5:03:2a:d4:47:4e:bc:3a:ce:c1: 09:90:4f:23:d1:f5:5e:68:6c:47:f2:9d:e0:88:84:a2:96:15: c7:7e:0d:39:08:2c:d8:d1:1c:a9:71:b1:16:c8:52:fa:41:9a: 5c:d5:be:58:9b:62:84:23:69:18:50:76:a8:bd:f7:1f:d3:ff: a3:3d:09:aa
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:18:4d:8e:cd:aa:b2:69:7c:73:05:00:00:00:00:18:4d Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Feb 26 20:00:32 2024 GMT Not After : Feb 25 20:00:32 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:d7:89:fd:77:ae:00:12:3c:10:07:df:f1:80:d5: d8:84:9b:fa:69:43:88:d4:77:9b:90:bf:7a:f1:f3: 22:f5:d2:69:d2:83:f0:61:46:7f:59:a2:cb:5e:2d: 69:b1:81:d1:47:9c:5d:ab:ed:3f:d0:0b:f6:75:52: 4e:7d:c0:81:e1:d4:a1:5b:57:f7:a3:e2:11:37:67: cd:6d:dc:d7:58:80:38:e1:7a:12:6a:26:00:c1:5b: 06:4f:f6:14:3c:80:a2:1d:14:78:c8:e4:ee:cc:02: b8:06:45:ab:c1:ea:e5:52:e9:46:8f:52:c4:bc:e7: 06:0b:32:e7:e5:ee:1f:d1:63:4a:8a:ba:9c:3f:18: d7:72:cd:67:47:f3:00:21:e6:d2:4b:8f:a0:72:4e: f9:14:1f:b4:00:db:70:ba:80:bb:69:17:2b:52:88: 30:e3:8a:19:f5:c5:85:eb:c8:7b:49:ef:f7:c1:20: 73:ac:14:20:dc:12:66:b7:f4:4c:c0:4c:3b:72:2f: 8d:5d:91:d6:cb:d0:93:06:24:4b:26:49:66:e6:82: b6:a7:c7:8e:f1:a0:7d:be:ca:17:e4:ea:d0:6e:e7: a7:f1:bc:18:07:6c:7e:6e:f1:d9:af:89:14:e2:42: eb:f1:b9:27:0a:b8:b7:ed:a4:cb:14:32:52:3a:b0: 4d:c3 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: A0:62:D4:96:88:48:0A:02:62:8D:31:84:1E:4F:11:2C:B8:FD:10:1E 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 61:ad:5d:4b:bf:34:35:dd:5a:a1:1a:c0:73:2f:b9:ef:f5:4c: df:02:90:63:23:73:06:78:a2:e9:ba:4b:2d:01:19:53:97:2d: d4:26:98:56:38:09:33:c8:bc:9d:7b:9b:c6:70:ac:55:26:23: 8e:16:32:e9:a6:52:52:a1:42:fc:1d:8f:7a:3d:b7:51:5d:d4: ad:c4:02:7e:a6:ac:bc:14:4e:7e:88:af:8c:6e:14:1e:af:6d: ce:1d:4a:a7:fa:8a:6f:3a:86:63:81:94:13:90:42:5d:71:7a: d6:c9:63:a2:b6:66:9a:74:3f:6d:8b:02:70:0d:64:6c:26:14: 49:e3:da:2f:70:83:08:f2:45:b5:79:0d:e3:9c:53:42:a5:44: 1e:d5:f0:18:fd:5a:71:48:31:a0:11:e8:2e:1f:67:36:d2:fd: ff:bb:33:08:1b:bc:64:23:48:85:48:1b:c4:3d:20:8d:af:6a: 98:bc:ba:ee:fd:b2:df:43:f4:03:76:00:4e:a1:f9:0d:29:d0: 4d:d8:d7:b0:4b:d1:7d:f9:eb:56:3a:f0:17:83:67:bc:9b:be: 3c:9d:69:bf:b5:c7:9c:9b:43:20:bb:92:7c:fb:9c:e2:d4:7c: ef:4a:ae:71:a9:55:36:b1:f7:43:5e:c2:49:0a:86:d4:bd:23: 75:c4:d8:16
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.880 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.880/0.880/0.880/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.997 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.997/0.997/0.997/0.000 ms