mam dwie virtualne sieci polaczone tunnelem GRE. Te dwie sieci maja adresowanie IPv4 i IPv6. Po ustawieniu IPsec'a dla IPv4 wszystko fajnie jest szyfrowane. Jednak mam problem z IPv6, niżej konfigi
IPv6:
Kod: Zaznacz cały
flush;
spdflush;
add 10.0.10.2 10.0.20.2 ah 20001 -m tunnel -A hmac-md5 "1231231231231231";
add 10.0.20.2 10.0.10.2 ah 20002 -m tunnel -A hmac-md5 "1231231231231231";
add 10.0.10.2 10.0.20.2 esp 20003 -m tunnel -E 3des-cbc "123123123123123123123123";
add 10.0.20.2 10.0.10.2 esp 20004 -m tunnel -E 3des-cbc "123123123123123123123123";
spdadd -6 2010:0::0/64 2030:0::0/64 any -P in ipsec esp/tunnel/10.0.10.2-10.0.20.2/require ah/tunnel/10.0.10.2-10.0.20.2/require;
spdadd -6 2030:0::0/64 2010:0::0/64 any -P out ipsec esp/tunnel/10.0.20.2-10.0.10.2/require ah/tunnel/10.0.20.2-10.0.10.2/require;
tak wyglada konfig dla IPv4 (zakomentowane bo domyslnie IPv4 nie bedzie, ale dziala jak trzeba, headery z AH i ESP sa przesylane w GRE, danych nie widac.):
Kod: Zaznacz cały
#flush;
#spdflush;
#add 10.0.10.2 10.0.20.2 ah 20001 -m tunnel -A hmac-md5 "1231231231231231";
#add 10.0.20.2 10.0.10.2 ah 20002 -m tunnel -A hmac-md5 "1231231231231231";
#add 10.0.10.2 10.0.20.2 esp 20003 -m tunnel -E 3des-cbc "123123123123123123123123";
#add 10.0.20.2 10.0.10.2 esp 20004 -m tunnel -E 3des-cbc "123123123123123123123123";
#spdadd 192.168.1.0/24 192.168.3.0/24 any -P out ipsec esp/tunnel/10.0.10.2-10.0.20.2/require ah/tunnel/10.0.10.2-10.0.20.2/require;
#spdadd 192.168.3.0/24 192.168.1.0/24 any -P in ipsec esp/tunnel/10.0.20.2-10.0.10.2/require ah/tunnel/10.0.20.2-10.0.10.2/require;