I'm trying to set up a VPN using debian sarge's distributed ipsec tools and racoon.
This is going to be a road warrior setup.
For illustrative purposes I've boiled down the problem to a minimum:
On the road warrior side (spud or 192.168.100.2):
spud$ sudo setkey -DP
192.168.100.86[any] 192.168.100.2[any] any
in ipsec
esp/tunnel/192.168.100.86-192.168.100.2/require
created: Jun 22 10:28:05 2005 lastused: Jun 22 10:33:30 2005
lifetime: 0(s) validtime: 0(s)
spid=3400 seq=2 pid=11814
refcnt=1
192.168.100.2[any] 192.168.100.86[any] any
out ipsec
esp/tunnel/192.168.100.2-192.168.100.86/require
created: Jun 22 10:28:05 2005 lastused: Jun 22 10:33:35 2005
lifetime: 0(s) validtime: 0(s)
spid=3393 seq=1 pid=11814
refcnt=1
192.168.100.86[any] 192.168.100.2[any] any
fwd ipsec
esp/tunnel/192.168.100.86-192.168.100.2/require
created: Jun 22 10:28:05 2005 lastused:
lifetime: 0(s) validtime: 0(s)
spid=3410 seq=0 pid=11814
refcnt=1
spud$ cat /etc/racoon/racoon.conf
path pre_shared_key "/etc/racoon/psk.txt";
remote 192.168.100.86 {
exchange_mode main;
proposal {
encryption_algorithm 3des;
hash_algorithm md5;
authentication_method pre_shared_key;
dh_group modp1024;
}
}
sainfo address 192.168.100.2/32 any address 192.168.100.86/32 any {
pfs_group modp1024;
encryption_algorithm 3des;
authentication_algorithm hmac_md5;
compression_algorithm deflate;
lifetime time 30 sec; # sec,min,hour NOTICE THE SHORT TIMEOUT
}
And on the VPN gateway side (blueberry or 192.168.100.86):
blueberry$ cat /etc/racoon/racoon.conf
path pre_shared_key "/etc/racoon/psk.txt";
remote 192.168.100.2 {
exchange_mode main;
generate_policy on; # NOTICE WE'RE GENERATING THE POLICY
passive on;
proposal {
encryption_algorithm 3des;
hash_algorithm md5;
authentication_method pre_shared_key;
dh_group modp1024;
}
}
sainfo address 192.168.100.86/32 any address 192.168.100.2/32 any {
pfs_group modp1024;
encryption_algorithm 3des;
authentication_algorithm hmac_md5;
compression_algorithm deflate;
}
From spud (the roadwarrior) a simple ping starts the VPN setup, and that's fine. This is the racoon output on startup on the VPN gateway (blueberry) side when it starts up.
2005-06-22 10:29:10: ERROR: such policy does not already exist: 192.168.100.2/32[0] 192.168.100.86/32[0] proto=any dir=in
2005-06-22 10:29:10: ERROR: such policy does not already exist: 192.168.100.2/32[0] 192.168.100.86/32[0] proto=any dir=fwd
2005-06-22 10:29:10: ERROR: such policy does not already exist: 192.168.100.86/32[0] 192.168.100.2/32[0] proto=any dir=out
I leave the ping from the roadwarrior going and watch the outputs of the racoons on both sides. When the 30 second timeout is coming up, a renegotiation of phase 2 starts. Sometimes this works fine - the ping just continues to go through... but eventually it goes wrong. The log outputs on both sides does not indicate that anything has gone wrong.