Eu quero configurar uma conexão persistente entre um cliente linux strongswan e um roteador cisco, o que significa que o ipsec tunnel funcionará para sempre?
É possível? Na minha configuração atual, o túnel desce depois de atingir ikelifetime, então eu preciso trazê-lo manualmente.
Aqui está minha configuração de 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
A seguir está minha configuração do IOS (parte 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
Tags networking vpn linux strongswan