Advertisement
Guest User

IPSec IKEv2/PSK Cisco(VTI)-to-Mikrotik(Policy-based)

a guest
Dec 16th, 2019
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. ! Cisco
  2.  
  3. crypto ikev2 proposal ike2.PROPOSAL
  4. encryption aes-cbc-256
  5. integrity sha256
  6. group 14
  7. !
  8. crypto ikev2 policy ike2.POLICY
  9. proposal ike2.PROPOSAL
  10. !
  11. crypto ikev2 keyring ike2.KEYRING
  12. peer peers.ALL
  13. address 0.0.0.0 0.0.0.0
  14. pre-shared-key local key.Secret
  15. pre-shared-key remote key.Secret
  16. !
  17. !
  18. !
  19. crypto ikev2 profile ike2.PROFILE
  20. match identity remote address 203.0.113.113 255.255.255.255
  21. identity local address 198.51.100.10
  22. authentication local pre-share
  23. authentication remote pre-share
  24. keyring local ike2.KEYRING
  25. dpd 10 2 on-demand
  26. !
  27. !
  28. crypto ipsec transform-set ips.TSET esp-aes 256 esp-sha256-hmac
  29. mode tunnel
  30. !
  31. !
  32. crypto ipsec profile ips.TUNNEL0
  33. set transform-set ips.TSET
  34. set ikev2-profile ike2.PROFILE
  35. !
  36. interface Tunnel0
  37. ip address 172.16.10.1 255.255.255.252
  38. tunnel source 198.51.100.10
  39. tunnel destination 203.0.113.113
  40. tunnel protection ipsec profile ips.TUNNEL0
  41. !
  42.  
  43. # Mikrotik
  44.  
  45. /ip ipsec peer profile
  46. add dh-group=modp2048 dpd-interval=30s enc-algorithm=aes-256 hash-algorithm=sha256 name=prof.PHASE1-STRONG
  47. /ip ipsec proposal
  48. add auth-algorithms=sha256 enc-algorithms=aes-256-cbc lifetime=1h name=prop.STRONG pfs-group=modp2048
  49. /ip ipsec peer
  50. add address=198.51.100.10/32 exchange-mode=ike2 profile=prof.PHASE1-STRONG secret=key.Secret
  51. /ip ipsec policy
  52. add dst-address=198.51.100.10/32 proposal=prop.STRONG sa-dst-address=198.51.100.10 sa-src-address=203.0.113.113 src-address=203.0.113.113/32 tunnel=yes
  53.  
  54. /interface gre
  55. add allow-fast-path=no !keepalive local-address=203.0.113.113 name=gre.ipsec.MYTUNNEL0 remote-address=198.51.100.10
  56.  
  57. /ip address
  58. add address=172.16.10.2/30 interface=gre.ipsec.MYTUNNEL0 network=172.16.10.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement