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.731 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.731/0.731/0.731/0.000 ms
Step 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.652 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.652/0.652/0.652/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 Oct 10 09:26:30 2024 GMT Oct 10 09:26: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 Oct 10 09:26:32 2024 GMT Oct 10 09:26:32 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, 0fef61e01b06234f_i e9d07f93abb3ce45_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 16460s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 21843s, expires in 31680s in c34d0d3d, 0 bytes, 0 packets out cbfb7075, 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, 0fef61e01b06234f_i* e9d07f93abb3ce45_r local 'DC=scep, DC=com, CN=entity2' @ 9.0.0.2[500] remote 'DC=scep, DC=com, CN=entity1' @ 8.0.0.2[500] NULL/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_3072 established 1s ago, rekeying in 24763s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 1s ago, rekeying in 14695s, expires in 31679s in cbfb7075, 0 bytes, 0 packets out c34d0d3d, 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:69:fc:56:e2:82:5e:85:19:a7:3b:00:00:00:00:69:fc Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Oct 10 09:26:32 2024 GMT Not After : Oct 10 09:26:32 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:bf:b6:4a:85:db:90:23:5c:4c:9e:cf:81:a9:6b: 4a:00:2b:f0:91:e7:be:61:f5:50:9d:4b:ce:f2:20: 46:4a:12:50:e1:95:09:60:95:02:fa:e1:5c:4f:dc: 66:3d:37:bc:5a:9b:be:65:98:26:8f:92:a4:07:1c: 94:c7:b3:32:eb:1b:23:c7:d3:6b:f4:5e:5a:c9:3d: ec:45:c9:6b:17:62:91:8b:17:3f:07:0b:5a:0e:a6: 58:6a:7d:af:30:aa:f5:ce:02:ce:8c:46:42:98:5d: 7c:3d:56:43:26:b5:1e:f9:70:e8:ec:ab:6b:75:ae: 9b:e8:b4:54:56:1f:79:a9:19:b9:3d:3e:d7:13:f6: 58:d8:18:7b:22:02:24:f2:97:cf:dd:a7:73:10:44: aa:e4:46:71:45:98:ec:1a:b0:e6:ea:86:1b:08:74: ac:65:5e:0c:95:30:01:e7:73:dc:59:53:1e:db:75: ef:86:9c:4d:05:59:b6:57:9a:ba:77:59:09:4a:ce: db:b6:77:33:62:52:3b:8f:18:b2:f5:d3:51:b2:4b: 31:30:bb:61:3a:47:c1:d9:68:d0:18:9c:9b:96:c1: 3c:ae:8b:6f:99:a8:dd:c6:fb:30:4c:66:c5:7f:3d: 68:a2:1b:f1:a3:3c:07:f3:4e:6a:21:d5:03:e8:bc: 2e:c7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 0E:C7:49:B7:A9:60:56:1F:50:5B:1F:F8:29:0F:29:9F:F9:26:15:8A 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 8b:5d:16:2d:45:47:88:c2:72:cf:50:ff:a5:df:5e:96:20:4d: bd:b9:6e:2f:18:34:e5:77:83:a6:8f:b5:0c:5b:03:20:85:b0: ee:c3:b5:e1:73:f2:26:5a:00:5a:de:5c:6f:3f:45:8f:08:c6: 2e:a7:a5:11:71:dc:ed:5c:82:cf:6d:45:7b:c8:b0:f5:fe:fd: 0c:f9:b7:f0:bf:3d:42:5c:91:94:be:58:bf:4a:21:1d:58:54: f0:36:53:b8:ac:29:63:86:15:23:dd:1c:63:45:d8:00:ac:29: c4:6f:f6:4d:a4:b1:1a:3f:c4:62:a7:35:ec:d1:a1:12:f5:cd: 43:5d:61:76:44:9c:df:b5:c6:0d:21:a5:6a:1a:b5:7b:25:de: fd:d6:68:15:8e:7c:f0:03:0f:6b:b4:11:78:7f:42:6e:0e:92: 89:02:12:b1:28:83:98:d4:62:45:80:06:77:5d:f9:22:0f:a0: 4b:92:c7:5d:17:65:2b:27:da:18:60:c8:72:a7:4d:d5:97:18: ed:ec:90:c7:8e:02:40:6f:2c:4d:dd:13:7f:b6:14:6f:78:33: 4d:ce:44:36:62:d2:a9:ae:c1:50:86:b1:0e:bf:02:c2:15:be: 13:99:f9:95:33:cb:fd:2b:14:1d:8b:df:e3:98:5b:56:5a:33: 98:77:54:96
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:69:fb:86:37:84:88:33:f6:36:ea:00:00:00:00:69:fb Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Oct 10 09:26:30 2024 GMT Not After : Oct 10 09:26: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:df:56:28:f6:d4:41:38:3c:19:fa:3d:b5:8b:ba: ca:24:5f:f7:14:dc:5c:e1:15:1f:bc:c9:c0:3f:5f: 13:8f:f3:ba:58:61:66:1b:96:7d:9f:a7:06:a1:7b: f5:86:3b:c7:21:4b:3b:97:77:f9:ca:d7:5f:0e:cf: 7d:7c:87:63:c0:6a:ff:f1:c3:c8:4c:f4:e6:b9:11: a6:c1:7a:07:3d:a7:4d:69:2b:2c:81:76:ff:ef:e8: dc:5f:24:23:1c:13:77:95:dc:e1:31:e3:27:8d:d7: 2b:56:31:58:24:14:f8:b8:35:6f:a6:44:e9:6e:5d: 6f:d1:35:8c:91:1a:b8:fe:8c:35:d3:e9:3b:c4:34: 17:39:60:ea:0a:fa:fa:ba:3b:a9:b7:92:9a:9f:93: 83:07:33:98:54:7f:0e:63:b3:59:7e:6f:f0:c2:5d: d0:e9:aa:81:1f:50:26:e5:6a:a1:c2:c1:3b:16:ed: 45:9c:15:0b:20:47:aa:5a:e6:c4:da:ff:40:47:3c: 5b:d5:38:be:0f:8f:1b:74:d6:8b:51:e9:71:b9:3a: b7:a8:0a:72:b3:f8:2f:14:5d:7c:46:37:8e:0d:8d: ab:17:7e:d5:dd:90:c8:6b:96:e8:12:81:74:84:b9: fb:4e:73:89:9a:20:e2:ed:e6:49:39:30:16:28:a0: 39:9d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: C8:2E:73:EA:7E:CB:40:2D:D2:B7:F4:BD:76:86:A3:6C:F8:68:01:E9 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 32:d0:eb:26:90:e7:ea:6f:68:df:d4:6a:9d:b7:d8:98:7d:8d: c5:33:6c:e6:93:f3:97:77:43:39:b4:cd:25:a7:0d:a4:28:52: c1:01:87:bc:37:87:55:54:0e:11:56:3c:23:41:f4:66:ce:bc: ab:80:cb:2e:0d:3f:9a:b8:87:e2:02:72:d8:96:b4:3a:ee:37: 39:19:5a:3f:bd:d0:a7:5e:01:4f:d4:1c:1c:70:27:6b:d8:4b: 62:8c:6f:06:fb:e5:e3:04:49:c8:6e:c4:35:03:ef:1e:13:dd: 4f:4e:64:57:ea:bf:8b:1e:44:2b:ad:1f:d1:ff:46:94:64:cd: 02:f8:6e:3f:75:6e:04:60:9d:f2:05:b6:fb:17:05:ab:fe:5b: f8:4a:90:13:31:71:68:4b:69:ed:eb:26:2d:82:95:e3:dd:bb: 92:21:72:66:c8:5d:a5:9f:eb:a3:d1:0b:14:b2:e2:88:36:ee: ec:73:40:70:5a:08:cf:2f:b6:6f:92:58:de:3a:b7:14:09:4b: f0:3e:f7:5d:cd:31:05:4f:3e:33:c0:de:b0:5d:cc:48:64:6e: b1:43:14:fc:39:c1:3f:be:73:c2:fb:fc:a6:2b:63:e5:1f:f5: 62:fb:1a:ff:23:9f:ff:48:11:d8:ff:1f:aa:3b:d0:5f:62:91: db:bb:6f:99
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.576 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.576/0.576/0.576/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.699 ms --- 192.168.1.1 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
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.688 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.688/0.688/0.688/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.736 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.736/0.736/0.736/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 Oct 10 09:27:48 2024 GMT Oct 10 09:27:48 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 Oct 10 09:27:53 2024 GMT Oct 10 09:27:53 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, 1294a73a6100a040_i 7a83d83c0835149b_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 24355s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 20566s, expires in 31675s in c23bf75f, 0 bytes, 0 packets out cebdca38, 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, 1294a73a6100a040_i* 7a83d83c0835149b_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 14519s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 17691s, expires in 31675s in cebdca38, 0 bytes, 0 packets out c23bf75f, 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:69:fe:cb:6d:29:13:e4:6a:24:dd:00:00:00:00:69:fe Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Oct 10 09:27:53 2024 GMT Not After : Oct 10 09:27:53 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:ed:d5:14:1c:2e:1f:18:f7:bd:b5:ba:a0:6b:ba: 7b:5f:16:9c:0b:1e:38:8b:2c:e7:21:79:35:d0:55: 92:81:a0:8e:7c:59:eb:3e:42:7b:11:07:46:3c:fb: 65:81:6f:ee:a0:95:66:3a:1d:2c:59:51:3c:ce:a9: 2d:0e:bc:f5:ef:e8:ce:08:53:de:63:30:f1:9d:43: 30:ad:c0:33:6a:fb:f7:9d:cd:db:bf:88:5d:7f:fc: e1:ae:9f:06:c2:65:01:38:da:30:db:ab:bd:ba:4c: 3e:2e:27:16:5d:68:59:bc:11:3b:58:a6:08:22:cd: cb:25:b0:a4:2a:0d:f8:63:9a:50:11:94:cc:76:23: 2d:a4:50:3c:02:60:0e:4e:6f:eb:39:6b:0a:d7:c8: 76:3c:3f:db:a0:07:a7:ce:8a:4e:43:df:a7:92:e0: 43:a9:ac:90:93:54:6c:0a:ac:0d:08:31:ef:b5:1c: 99:66:06:a7:b7:06:34:c9:76:77:7d:44:33:b5:da: 8b:91:b1:23:1e:2f:c0:91:67:ce:48:85:ba:be:f7: 4e:8f:27:07:3c:53:0f:61:29:10:49:68:9f:0e:ca: 4a:2e:49:5d:ab:79:dc:77:5f:48:73:8e:59:1e:ce: da:30:1d:1b:ea:16:5a:7e:ae:58:ab:11:ba:20:1f: 53:39 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: A7:F1:A7:A4:95:C2:31:77:81:8D:97:C1:1B:C9:67:78:2B:61:1F: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 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 8e:74:13:76:54:6c:ea:0c:d5:20:40:4d:f6:f8:2c:a3:8f:f6: fa:6a:76:6f:4b:19:3d:b9:e4:f2:c0:82:ec:3e:0e:8a:02:74: 7b:02:21:59:c4:2e:5b:da:ed:49:88:69:c2:56:f7:f9:c7:47: ac:0b:bc:08:88:28:8e:46:24:37:45:e0:f1:d2:46:f4:55:96: 23:02:16:77:4c:f8:eb:8c:19:49:c4:ab:09:3c:69:8e:20:8c: 15:3d:d3:fc:cd:7a:d4:57:3c:9d:52:73:1f:b4:ff:d2:d3:11: cc:27:2b:2a:ac:aa:20:96:41:cf:34:2a:6d:0b:30:6a:33:fa: 75:c2:44:06:16:90:60:e7:fe:26:bd:e8:3b:21:cc:ec:f6:29: fd:9e:38:d1:05:b4:41:30:9e:53:f1:b6:ab:c7:05:91:44:8e: 5e:c8:4a:6f:e7:bf:50:d4:2f:4c:f7:fd:ec:0d:1f:fa:47:be: 50:0c:70:f3:da:d4:99:18:93:54:21:93:32:2a:8f:3d:da:42: 35:dd:9e:76:a1:f0:34:02:93:f6:a6:a7:2b:47:38:a7:4b:77: 9d:87:3c:f1:a3:a7:71:01:15:a3:55:27:8d:53:ab:28:ca:24: c4:55:b8:0c:d5:eb:be:e7:17:30:eb:5b:12:84:81:eb:b6:e2: bb:fb:43:62
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:69:fd:df:a7:4f:e9:3b:15:56:ff:00:00:00:00:69:fd Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Oct 10 09:27:48 2024 GMT Not After : Oct 10 09:27:48 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:ad:cb:4d:3a:96:56:92:3e:f1:fc:e4:cf:e5:57: 5c:53:d5:16:47:13:30:7b:df:90:e2:45:1d:d7:82: a6:2f:74:12:ca:76:e7:27:36:ef:1c:f9:25:43:6e: 85:1e:2d:42:0f:dc:f8:1a:44:26:bd:a9:10:7c:36: 0b:16:11:1a:4f:0a:2a:dd:d9:71:65:40:9a:f7:26: c2:b6:56:f6:34:af:a5:98:4a:3a:df:8a:1a:ac:0b: 9f:b7:61:81:62:07:c1:7c:1c:0f:4f:8b:81:e0:19: 3a:1d:21:38:74:c2:df:3e:f9:2c:61:6f:fe:6b:4b: f6:b7:f1:d2:d6:12:c7:8c:48:61:fa:a4:36:6e:b3: b0:6f:79:df:78:cb:de:d4:74:9c:67:e1:ce:db:b5: e6:b4:24:8d:17:ce:42:35:84:6e:6f:d0:e3:ae:a3: 00:ce:88:6c:fb:57:2c:95:53:da:fb:96:70:27:28: 44:0c:ba:f4:cb:fe:66:26:c3:bf:9c:d0:37:5c:d2: 19:74:05:d6:23:d0:e6:ed:78:e5:63:65:59:84:0f: eb:f0:82:cf:a8:0a:01:48:86:0d:26:c4:f5:52:d8: 5e:7d:1f:4f:7b:84:78:c8:37:87:a4:dc:8d:86:57: 8b:ab:d4:b6:f8:7f:7b:4c:17:c2:f0:22:cb:fc:33: 4b:2d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: CF:01:D8:57:84:B9:BF:94:CD:06:C7:A7:52:C7:35:2E:90:AD:3E:7F 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 a3:6c:80:42:eb:37:aa:03:e6:c0:c0:03:9d:d8:c8:b1:8a:7c: cc:03:46:95:8d:a9:2c:3e:da:74:ed:b2:fe:7b:87:15:6a:96: 94:ab:19:fc:5f:80:bf:02:4f:a9:3a:6f:e9:f9:21:00:af:bc: e5:d0:7b:87:5f:20:14:ea:3f:da:85:15:60:d4:d3:72:db:b3: 3b:d9:30:e8:4a:d6:fe:92:31:14:e3:a0:71:e1:ab:2b:8a:6b: e0:2a:ca:a5:58:e8:a5:fd:76:42:69:2a:e4:3b:84:86:33:b0: 97:23:ad:40:9a:9b:d4:f3:2e:97:c7:f6:60:95:42:59:c0:d2: 25:a7:4a:35:44:25:f4:cc:66:e4:f4:61:7c:d0:66:dc:55:6b: ec:af:36:e2:74:0b:cb:6f:7a:07:39:0c:3d:81:5b:1c:d1:7c: a6:6a:dc:76:e3:83:1f:81:33:9b:42:9c:c1:68:38:d1:a6:85: 69:86:a7:20:cd:34:09:ba:4f:18:90:8a:f2:cb:8a:b6:a4:47: 46:d0:2d:77:0d:fc:86:a4:07:4b:d0:fe:6c:8d:15:29:4b:80: 76:04:13:76:7b:44:57:27:01:60:9d:b5:06:66:7f:eb:87:34: b0:d8:1f:d1:7d:a2:0c:ee:7a:40:17:d7:d4:be:95:40:da:93: 46:a9:39:28
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.692 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.692/0.692/0.692/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.814 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.814/0.814/0.814/0.000 ms