Tunnel VTI · Pre-Shared Key · ENARSI + Client
! ══════════════════════════════════════════════ ! R1 — IPsec IKEv2 VTI vers Palo Alto ! ══════════════════════════════════════════════ ! 1. IKEv2 Proposal ── algorithmes IKE SA ────── crypto ikev2 proposal PROP-IKEv2 encryption aes-cbc-256 integrity sha256 group 14 ! 2. IKEv2 Policy ───────────────────────────── crypto ikev2 policy POL-IKEv2 proposal PROP-IKEv2 ! 3. Keyring — Pre-Shared Key ───────────────── crypto ikev2 keyring KR-PA peer PALO-ALTO address 10.0.0.2 pre-shared-key MySecret123 ! 4. IKEv2 Profile ──────────────────────────── crypto ikev2 profile PROF-IKEv2 match identity remote address 10.0.0.2 255.255.255.255 authentication remote pre-share authentication local pre-share keyring local KR-PA ! 5. IPsec Transform-Set ── Child SA (ESP) ───── crypto ipsec transform-set TS-ESP esp-aes 256 esp-sha256-hmac mode tunnel ! 6. IPsec Profile ──────────────────────────── crypto ipsec profile IPSEC-PROF set transform-set TS-ESP set ikev2-profile PROF-IKEv2 ! 7. Interface VTI ──────────────────────────── interface Tunnel0 ip address 172.16.0.1 255.255.255.252 tunnel source GigabitEthernet0/0 tunnel destination 10.0.0.2 tunnel mode ipsec ipv4 tunnel protection ipsec profile IPSEC-PROF ! 8. Route vers le LAN Palo Alto ────────────── ip route 192.168.2.0 255.255.255.0 Tunnel0
# ══════════════════════════════════════════════ # PALO ALTO CLI — IPsec IKEv2 vers Cisco R1 # Entrer en mode config : > configure # ══════════════════════════════════════════════ # 1. Interface Tunnel ────────────────────────── set network interface tunnel units tunnel.1 ip 172.16.0.2/30 set network interface tunnel units tunnel.1 comment "VPN-CISCO-R1" set zone VPN network layer3 [ tunnel.1 ] # 2. IKE Crypto Profile ──────────────────────── set network ike crypto-profiles ike-crypto-profiles PROF-IKE-CISCO dh-group group14 set network ike crypto-profiles ike-crypto-profiles PROF-IKE-CISCO hash [ sha256 ] set network ike crypto-profiles ike-crypto-profiles PROF-IKE-CISCO encryption [ aes-256-cbc ] set network ike crypto-profiles ike-crypto-profiles PROF-IKE-CISCO lifetime hours 8 # 3. IPsec Crypto Profile ────────────────────── set network ike crypto-profiles ipsec-crypto-profiles PROF-IPSEC-CISCO esp encryption [ aes-256-cbc ] set network ike crypto-profiles ipsec-crypto-profiles PROF-IPSEC-CISCO esp authentication [ sha256 ] set network ike crypto-profiles ipsec-crypto-profiles PROF-IPSEC-CISCO dh-group group14 set network ike crypto-profiles ipsec-crypto-profiles PROF-IPSEC-CISCO lifetime hours 1 # 4. IKE Gateway ─────────────────────────────── set network ike gateway GW-CISCO-R1 authentication pre-shared-key key MySecret123 set network ike gateway GW-CISCO-R1 protocol ikev2 ike-crypto-profile PROF-IKE-CISCO set network ike gateway GW-CISCO-R1 protocol ikev2 dpd enable yes set network ike gateway GW-CISCO-R1 protocol-common nat-traversal enable no set network ike gateway GW-CISCO-R1 local-address interface ethernet1/1 set network ike gateway GW-CISCO-R1 local-address ip 10.0.0.2/30 set network ike gateway GW-CISCO-R1 peer-address ip 10.0.0.1 # 5. IPsec Tunnel ────────────────────────────── set network tunnel ipsec TUNNEL-CISCO-R1 tunnel-interface tunnel.1 set network tunnel ipsec TUNNEL-CISCO-R1 ike gateway GW-CISCO-R1 set network tunnel ipsec TUNNEL-CISCO-R1 ike ipsec-crypto-profile PROF-IPSEC-CISCO set network tunnel ipsec TUNNEL-CISCO-R1 disabled no # 6. Security Policy ─────────────────────────── set rulebase security rules ALLOW-TRUST-VPN from [ Trust ] set rulebase security rules ALLOW-TRUST-VPN to [ VPN ] set rulebase security rules ALLOW-TRUST-VPN source any set rulebase security rules ALLOW-TRUST-VPN destination any set rulebase security rules ALLOW-TRUST-VPN action allow set rulebase security rules ALLOW-VPN-TRUST from [ VPN ] set rulebase security rules ALLOW-VPN-TRUST to [ Trust ] set rulebase security rules ALLOW-VPN-TRUST source any set rulebase security rules ALLOW-VPN-TRUST destination any set rulebase security rules ALLOW-VPN-TRUST action allow # 7. Route statique ──────────────────────────── set network virtual-router default routing-table ip static-route TO-CISCO-LAN destination 192.168.1.0/24 set network virtual-router default routing-table ip static-route TO-CISCO-LAN interface tunnel.1 set network virtual-router default routing-table ip static-route TO-CISCO-LAN nexthop next-vr default # 8. Commit ──────────────────────────────────── commit