Strongswan 持久连接

Strongswan 持久连接

我想在 Linux Strongswan 客户端和思科路由器之间建立持久连接,这意味着 IPsec 隧道将永远存在?

有可能吗?在我当前的配置中,隧道在达到 ikelifetime 后将关闭,然后我需要手动将其启动。

这是我的 strongswan 配置:

config setup
    uniqueids=never

conn %default
    keyexchange=ikev1
    type=tunnel
    left=%any
    auto=add
    dpdaction=clear
    margintime=0s
    rekeyfuzz=20%
conn cisco-ezvpn
    right=10.0.1.1
    left=10.0.1.2
    leftid=19
    leftsourceip=%config
    right=10.0.1.1
    rightsubnet=0.0.0.0/0
    xauth_identity=test
    leftauth2=xauth
    xauth=client
    aggressive=yes
    leftauth=psk
    rightauth=psk
    ikelifetime=300s
    lifetime=300s
    ike=aes256-sha256-ecp256
    esp=aes256-sha256

以下是我的IOS配置(ipsec部分):

crypto isakmp policy 1
 encr aes 256
 hash sha256
 authentication pre-share
 group 19
 lifetime 300
!
crypto isakmp key test address 10.0.1.2       
crypto isakmp keepalive 10
!
crypto isakmp client configuration group RA
 key test
 domain test.com
 pool POOL
 acl split
 save-password
 netmask 255.255.255.0
!
crypto isakmp client configuration group 19
 key test123
 domain test.com
 pool POOL
 acl split
 save-password
 netmask 255.255.255.0
crypto isakmp profile test
   match identity group RA
   match identity group 19
   client authentication list AUTH
   isakmp authorization list NET
   client configuration address respond
   client configuration group 19
   virtual-template 1
!
!
crypto ipsec transform-set test esp-aes 256 esp-sha256-hmac 
 mode tunnel
!
crypto ipsec profile ipsecprof
 set security-association lifetime kilobytes disable
 set transform-set test 
!         
!         
crypto map cmap 10 ipsec-isakmp 
 set peer 10.0.1.2
 set transform-set test 
 match address split
!
!
interface Virtual-Template1 type tunnel
 ip unnumbered Vlan10
 ip nat inside
 ip virtual-reassembly in
 tunnel source Vlan10
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile ipsecprof
!
interface Vlan10
 ip address 10.0.1.1 255.255.255.248
 ip helper-address 10.0.1.1
 ip nat inside
 ip virtual-reassembly in

相关内容