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.644 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.644/0.644/0.644/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 May 22 10:03:04 2024 GMT May 22 10:03:04 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 May 22 10:03:06 2024 GMT May 22 10:03:06 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, 0c9488f640c7c64c_i dec268417824352d_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 24646s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 0s ago, rekeying in 16851s, expires in 31680s in c99c2d7a, 0 bytes, 0 packets out cc624147, 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, 0c9488f640c7c64c_i* dec268417824352d_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 26453s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 1s ago, rekeying in 15305s, expires in 31679s in cc624147, 0 bytes, 0 packets out c99c2d7a, 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:32:74:d4:22:35:61:1d:05:cc:65:00:00:00:00:32:74 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: May 22 10:03:06 2024 GMT Not After : May 22 10:03:06 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:14:df:6b:ad:ed:cc:61:54:c6:c4:58:fc:ba: e5:f8:86:e2:85:29:d3:2e:fb:7a:6a:c0:46:63:f0: 03:39:ca:73:a1:33:4d:15:d2:6f:91:49:87:ac:0d: b5:48:5e:12:bf:a1:08:23:da:04:90:21:12:6d:ef: 7c:a5:f2:9e:48:04:bc:f9:0d:18:d6:ef:fc:d6:c6: 20:49:06:ff:68:86:20:7c:f2:c6:6c:7b:1c:81:48: be:17:5b:5b:63:12:d9:2d:f2:88:20:ef:79:9e:e8: 41:9a:f4:a3:8a:4e:ca:94:94:69:17:9e:8b:30:68: 71:d4:e4:49:cf:57:44:a1:4b:f3:cc:95:7e:64:a7: 95:11:12:d0:c8:00:05:3f:7b:a9:d4:f1:bb:bf:06: 6d:c6:ae:fe:55:99:f8:6b:a2:03:de:f9:51:d2:58: 76:9f:20:3b:23:ad:64:ee:a5:25:df:dd:56:89:2b: 11:e1:d0:77:0b:1e:b6:b3:2d:15:18:e9:3a:01:7f: 08:d0:cf:48:21:be:b7:7e:7b:54:60:2b:b2:7c:06: 9e:79:91:0b:db:71:33:d4:a9:d9:12:3e:0e:06:02: 99:02:e3:5b:e4:ae:a4:53:3e:57:45:3f:36:b0:97: f9:f6:89:a1:8e:04:39:a5:3c:21:99:3a:02:6a:71: 5b:3b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 67:56:C8:65:1A:82:63:EE:C2:05:B3:C9:ED:93:81:2E:66:ED:F2:6D 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 3d:d5:34:89:aa:d9:2d:f6:ab:d1:05:9d:a1:64:16:ed:d9:9d: d7:6e:de:82:86:cc:54:19:3b:37:13:01:ad:dd:5a:6d:02:02: 47:c8:3b:f8:c7:06:e4:d5:df:fc:56:6c:67:84:7e:44:7f:5a: ba:e3:2c:b9:33:e3:1e:0b:a7:5e:bb:15:31:0f:06:55:33:e6: ec:23:c4:99:11:7f:3e:d0:5f:67:0a:5b:f5:e4:92:f1:ef:71: 68:ed:e5:ed:61:84:43:85:9d:36:10:5f:4b:fe:63:c1:3a:60: d5:ac:b2:21:19:19:26:18:e3:2e:33:84:bb:ba:c8:ce:a4:3c: 21:d1:9c:be:1a:59:e8:bb:cb:f0:46:86:9c:7b:7d:24:46:a1: 19:3f:05:8f:60:83:09:8f:c3:75:85:21:ed:89:57:c4:25:be: b5:a4:f2:91:5e:3a:73:2c:b3:72:00:cb:61:54:07:eb:14:56: 05:60:81:48:b5:55:08:29:b2:71:66:b4:04:57:3e:4f:5f:b7: 24:45:4b:d9:d8:ff:db:7e:01:a3:8d:5c:2a:2d:94:16:38:d0: 95:c3:7f:4c:98:93:28:e2:1e:d6:a3:36:78:1a:48:90:d5:b7: a9:b2:16:8a:8b:78:58:b2:13:5e:94:89:67:dc:6c:da:98:dc: a0:57:de:74
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:32:73:3a:48:2e:68:4c:31:95:25:00:00:00:00:32:73 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: May 22 10:03:04 2024 GMT Not After : May 22 10:03:04 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:b1:60:ae:62:61:c1:43:51:40:44:60:99:57:a4: e7:28:41:67:a8:8f:2a:9a:ba:64:5c:6e:31:15:14: 7a:52:61:5d:b0:d8:0c:15:66:0f:95:c9:52:39:e2: 8b:14:a6:82:3c:30:b1:5d:19:63:1e:56:9b:c1:2f: d0:91:da:c4:0e:ff:6f:9f:0f:7c:d2:72:b0:be:8f: d8:0e:44:88:39:25:63:30:75:bb:40:6a:08:4d:26: a6:1a:4c:08:48:97:8e:d2:00:e2:b8:2d:01:74:28: cc:87:a9:31:f8:1f:41:51:17:da:15:8b:72:ad:90: 2e:f4:36:1f:00:e6:79:de:a9:3b:73:37:ad:13:ee: 1c:5d:14:f2:de:b0:41:30:a7:28:57:ce:f9:ed:95: 99:a1:73:dc:12:fd:38:15:03:25:3b:5b:ab:c0:c5: 06:8a:54:78:12:1f:4b:b1:48:75:c5:83:22:08:83: aa:fd:b8:2f:65:70:2b:3a:e7:06:a0:4d:f0:5c:4f: 65:bf:94:0a:d4:7b:af:0f:90:1f:ef:48:8b:37:3b: 18:3d:30:59:3e:af:43:e5:89:04:07:78:1a:c1:55: 27:9c:fd:ca:bb:e4:a9:dc:a1:d3:87:ba:94:22:d0: 5e:11:b5:8c:cd:cb:80:df:db:b3:cd:1a:41:5e:1c: cf:cf Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 91:55:E0:0E:08:A5:EE:9A:71:2C:08:77:00:53:AF:D6:DD:42:E0:EE 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 43:52:44:31:5a:0d:d4:43:30:70:3e:c5:20:b9:c6:ec:73:2c: 66:98:c0:4d:cf:63:ad:90:67:b0:40:3a:96:c8:82:a5:e9:d5: f4:4a:59:bb:ce:aa:78:17:1c:0e:fd:e5:18:36:df:a3:46:39: 4e:53:17:85:d1:a3:d9:88:42:a7:75:4d:96:b1:90:59:3f:c7: fd:9b:8d:ad:09:89:68:b1:74:70:68:49:23:56:57:1d:09:0c: 9d:05:83:2a:90:e8:76:85:63:33:a1:e1:86:79:5b:38:e5:ff: fd:fe:5d:aa:85:8d:12:b5:a6:e1:0c:f2:d8:24:c0:e5:68:b7: 3e:99:ee:e1:b5:e0:d5:83:b2:98:4d:36:a9:9b:87:7f:95:8c: d1:26:c2:10:d8:17:c0:49:82:76:9e:79:fe:7a:18:e0:c9:bb: 85:25:b5:28:d0:a3:d6:8d:87:e3:f8:6f:5b:05:8e:00:c4:82: 20:7e:69:fd:95:c8:8c:8b:67:ac:27:a5:77:ef:3d:d0:78:40: 29:93:2e:64:aa:e6:77:bc:7c:80:fc:79:04:d8:86:bf:5b:78: d7:36:06:7c:75:2d:4e:7e:05:d3:a8:94:f1:9b:3a:9d:c5:e4: b4:fd:cf:1f:c5:b8:4a:ca:cc:39:84:b7:b5:e3:aa:19:fa:29: f9:4f:63: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=0.750 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.750/0.750/0.750/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.686 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.686/0.686/0.686/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.720 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.720/0.720/0.720/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.701 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.701/0.701/0.701/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 May 22 10:04:19 2024 GMT May 22 10:04:19 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 May 22 10:04:24 2024 GMT May 22 10:04:24 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, 213cbd1ec4eca347_i 3398f2856ab58f01_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 22461s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 14713s, expires in 31675s in c0a96fc8, 0 bytes, 0 packets out c0e3eab2, 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, 213cbd1ec4eca347_i* 3398f2856ab58f01_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 19667s peer-PEER-tunnel-1: #1, reqid 1, INSTALLED, TUNNEL, ESP:NULL/HMAC_SHA1_96 installed 5s ago, rekeying in 26761s, expires in 31675s in c0e3eab2, 0 bytes, 0 packets out c0a96fc8, 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:32:76:eb:76:45:35:d1:1a:7f:45:00:00:00:00:32:76 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: May 22 10:04:24 2024 GMT Not After : May 22 10:04:24 2026 GMT Subject: DC = scep, DC = com, CN = entity2 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:b7:d5:52:75:de:ff:13:8d:81:05:ba:2d:49:b4: d6:e7:6a:a3:c6:80:bc:c0:2e:4b:74:a1:63:73:92: a0:fb:9f:12:2b:4f:8a:8f:8d:46:82:72:d4:16:63: ae:62:09:1e:53:86:21:a6:8e:5b:91:56:44:2d:a2: a7:fa:a7:e7:5c:d2:e4:41:70:a3:88:c3:0c:a5:68: a1:9d:c4:da:4b:b2:2c:02:34:ce:5a:33:f3:d0:6f: 95:7d:7d:de:e8:90:12:41:fe:f0:9a:b3:2b:4b:df: ad:da:df:14:ef:4b:31:35:0f:66:41:91:13:71:44: 5c:d9:ff:ba:69:23:81:0b:20:13:8a:e9:ad:9d:c9: a2:c9:5b:32:f2:6e:4f:c8:f3:f5:7d:e3:12:ba:5f: 5f:47:7b:ea:18:ed:15:6c:53:63:45:be:5f:80:57: 03:38:d5:7b:8c:2f:79:1d:05:7e:02:88:be:5e:68: 7c:1a:f9:39:fc:2c:42:b6:9d:40:52:7b:f0:dc:9d: 0e:25:72:43:16:b4:30:75:d7:bb:c6:d9:cd:ee:39: 3e:2f:8e:84:cf:79:6b:ff:5c:ea:a3:48:00:6f:90: 00:3b:01:39:1a:98:7b:de:f9:90:57:ea:f5:76:f0: a8:67:73:17:39:b6:67:f3:5d:31:02:0f:7f:83:43: e9:d1 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 32:61:3A:EE:62:57:C2:67:1D:3B:5E:6C:72:42:6A:1C:B8:37:AF:09 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 56:45:ab:2c:b8:e6:9e:2a:c1:54:26:de:da:9e:1e:e5:13:88: 7c:ce:5e:9b:76:34:56:0e:ec:3b:a5:d4:fe:89:b1:24:07:9a: 56:38:f9:c1:05:fa:54:be:3c:5a:48:f2:2e:7a:6e:93:21:cb: 61:c9:2d:a4:04:fb:0d:fb:10:d5:4d:0d:79:41:98:ad:0f:e4: 2b:5b:da:0d:2c:17:5d:52:83:85:79:b7:32:5c:3d:c1:f5:85: e3:40:59:7e:3c:29:f9:54:95:86:47:14:c9:37:85:66:53:62: 77:74:00:15:72:76:c5:7a:7f:28:78:19:fd:15:e8:b5:6b:bb: 90:a9:72:64:4c:67:74:51:b9:d0:a8:ce:f2:74:33:4f:c7:55: 1e:67:43:36:b8:5a:8d:2b:b6:03:8c:a8:14:d5:95:4e:9a:6d: c9:a5:ea:28:e1:bd:79:8e:7b:8f:2c:30:73:ae:8a:f4:92:66: f3:f5:34:fd:93:48:51:79:30:5d:49:91:8c:dd:41:d8:1b:67: f9:fb:d1:16:6c:f0:fa:34:aa:51:50:7b:55:08:5b:42:95:18: 2f:8f:c5:4f:d3:64:53:01:40:3c:9b:1b:16:75:cb:f3:f8:d7: c7:94:5f:60:ce:af:4c:ce:3e:d1:bc:16:2c:4b:12:60:30:da: c9:b1:5f:c5
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:32:75:76:4a:ab:68:8c:be:78:3a:00:00:00:00:32:75 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: May 22 10:04:19 2024 GMT Not After : May 22 10:04:19 2026 GMT Subject: DC = scep, DC = com, CN = entity1 Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:c3:88:35:ed:89:82:05:ac:6a:42:08:aa:e6:10: 8b:10:4c:9d:bf:93:7f:53:b6:43:1a:7c:46:ef:8d: b7:b3:d8:ab:fb:0f:9b:2e:d9:6c:f9:f9:15:30:07: b6:88:c5:47:2f:a3:9c:00:5c:2c:f3:c7:9e:28:5f: 36:80:ab:ab:76:90:cd:2e:a1:cd:0e:20:68:3b:f8: 20:8e:61:41:c4:9f:cd:47:4d:11:85:ad:d3:60:b7: cd:15:04:9a:de:65:ae:3a:4e:50:84:12:22:0b:1f: 56:0b:a9:a9:37:ff:5c:f0:2b:8c:46:31:ca:96:12: b5:b4:cf:ec:c6:8d:39:63:fe:04:72:4a:7c:af:86: ac:31:c0:1d:96:04:af:d9:7a:0d:20:a3:72:a5:4d: 3c:c6:cc:3f:1f:65:93:e0:8d:6b:cf:4d:5a:7b:d0: f4:ef:04:37:8f:85:3c:af:bf:b7:9c:69:5c:11:2e: af:c5:8c:50:0b:32:f9:f9:a9:60:1e:cf:c3:93:5d: 65:44:de:3f:c7:e6:4a:ff:77:d9:bb:08:9c:4b:71: 29:c9:48:af:0c:dd:25:9d:d5:38:ef:74:2f:54:8b: 69:8a:16:a3:16:34:dc:48:99:d2:28:bf:6d:24:8b: 2f:98:3e:7e:95:9f:4c:02:6d:0c:53:c9:16:12:75: ea:1b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 2F:3C:E9:FE:C0:DF:51:DC:96:63:33:10:27:37:8F:05:7B:02:78:C5 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 68:38:69:da:c1:6d:34:56:f9:da:f1:06:69:da:10:f4:63:fd: 5b:d2:85:16:3a:b9:48:1b:c1:ea:58:51:43:ad:30:a1:c6:d6: ac:07:e8:40:4d:0f:bc:3e:4f:e8:66:b3:6e:71:1e:f4:fc:99: ed:91:5f:67:db:e5:f6:57:e2:37:88:22:c5:a5:95:7e:38:db: 6a:ce:5d:4d:62:ba:7f:be:6c:70:8b:c2:53:86:05:21:b0:8b: f4:48:58:21:e0:41:d6:4e:0f:1c:94:d2:c9:78:6d:75:6a:9f: af:da:dd:f9:0c:da:f6:dc:42:4f:3b:e3:42:9e:56:81:06:4d: 2b:9d:7d:68:63:e5:6a:6c:67:e0:e1:f6:8a:12:83:ea:4f:6c: e7:8b:76:93:85:bd:69:eb:47:e7:40:58:da:e9:ce:94:b3:ee: 47:3a:33:6b:e5:e9:ea:58:0f:07:08:3d:17:3e:cc:8d:2c:e6: 3b:06:5d:57:b9:8f:a9:04:a1:fb:1b:eb:b4:98:de:22:09:d0: e4:0f:82:bc:52:1e:74:b8:fd:6c:04:f4:c6:32:bd:10:49:9f: 7d:e5:28:00:2a:d3:32:e0:e5:3c:d8:a6:b6:43:d6:b0:82:cf: 25:fb:b0:d3:b6:a4:81:76:20:67:ef:47:aa:6a:2b:ee:3e:a1: 14:9d:1f:52
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.669 ms --- 192.168.2.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.669/0.669/0.669/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.782 ms --- 192.168.1.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.782/0.782/0.782/0.000 ms