Tunnel IPSec sur les routeurs Cisco
Cette documentation a été écrite il y a bien longtemps et n'est plus mise à jour. Comprenez que les informations que vous y trouverez peuvent avoir changé de manière conséquente !
Créer un tunnel IPSec entre deux routeurs Cisco. L'article original est Nicolargo sous licence CC.
+--------+ .~.~.~. +--------+
| Lan 1 |------[Routeur A]------{Internet}------[Routeur B]------| Lan 2 |
+--------+ | ~.~.~.~ | +--------+
192.168.1.0/24 | | 192.168.2.0/24
|<----------------------------->|
Vpn IPSec Aes256
Configuration du routeur A
crypto isakmp policy 1
authentication pre-share
lifetime 86400
crypto isakmp key AZERTYUIOPQSDFGHJKLMWXCVBNAZERTY address 80.80.80.2
crypto ipsec transform-set MATS esp-aes 256 esp-sha-hmac
crypto map MAMAP 10 ipsec-isakmp
set peer 80.80.80.2
set transform-set MATS
match address IPSEC-TUN
ip access-list extended IPSEC-TUN
permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
interface FastEthernet 0/1
crypto map MAMAP
Configuration du routeur B
crypto isakmp policy 1
authentication pre-share
lifetime 86400
crypto isakmp key AZERTYUIOPQSDFGHJKLMWXCVBNAZERTY address 80.80.80.1
crypto ipsec transform-set MATS esp-aes 256 esp-sha-hmac
crypto map MAMAP 10 ipsec-isakmp
set peer 80.80.80.1
set transform-set MATS
match address IPSEC-TUN
ip access-list extended IPSEC-TUN
permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
interface FastEthernet 0/1
crypto map MAMAP