Secure IPSec between Cisco IOS and Libreswan

Here you can find the configuration for Libreswan (3.12) and Cisco IOS (15.3M):

Linux:

conn vpn
left=10.10.11.100
leftsubnet=10.12.11.0/24
leftnexthop=10.10.11.1
right=10.10.10.100
rightsubnet=10.12.10.0/24
rightnexthop=10.10.10.1
authby=secret
pfs=yes
rekey=yes
keyingtries=3
type=tunnel
auto=start
ike=aes256-sha2_256;dh24
phase2alg=aes256-sha2_256;dh24

10.10.11.100 10.10.10.100: PSK „128 chars please“

 

Cisco:

crypto isakmp policy 1
encr aes 256
hash sha256
authentication pre-share
group 24
crypto isakmp key <128 chars please> address 10.10.10.100
!
!
crypto ipsec transform-set aes-sha esp-aes 256 esp-sha256-hmac
mode tunnel
!
!
!
crypto map VPN 10 ipsec-isakmp
set peer 10.10.10.100
set transform-set aes-sha
set pfs group24
match address 100
!

access-list 100 permit ip 10.12.11.0 0.0.0.255 10.12.10.0 0.0.0.255

interface X
crypto map VPN