# Effacement des regles precedentes
flush;

######### Definition de la SA ###########
## de client1 vers serveur1
add 10.40.0.13 10.40.0.9 ah  1000 -m transport -A hmac-md5 "1234567890123456";
add 10.40.0.13 10.40.0.9 esp 1001 -m transport -E 3des-cbc "123456789012345678901234";

## de serveur1 vers client1
add 10.40.0.9 10.40.0.13 ah  2000 -m transport -A hmac-md5 "1234567890123456";
add 10.40.0.9 10.40.0.13 esp 2001 -m transport -E 3des-cbc "123456789012345678901234";

######### Definition de la SPD ##########
spdflush;
# politique en sortie
spdadd 10.40.0.13 10.40.0.9 any -P out ipsec 
ah/transport/10.40.0.13-10.40.0.9/use
esp/transport/10.40.0.13-10.40.0.9/use;
# politique en entree
spdadd 10.40.0.9 10.40.0.13 any -P in ipsec
ah/transport/10.40.0.9-10.40.0.13/use
esp/transport/10.40.0.9-10.40.0.13/use;