And this part will also need to be adapted for more than two machines:

add $IP1 $IP2 $ENCAP 15700 $CRYPT "$PASSKEY";
add $IP2 $IP1 $ENCAP 15701 $CRYPT "$PASSKEY";

Those numbers (15700, 15701) are the "Security Parameter Index" values, and should probably be unique for each IP/IP combination/order. And I think they still have to match between the server's entries and the remote entries. Any script you use would have to take that into account as well.

Cheers


Edited by mlord (01/12/2005 19:25)