Здравствуйте, коллеги!
Мучал гугл, но без вашей помощи чувствую мне не обойтись, т.к. битый час сижу мучаюсь, но ничего не получается и
я много чего недопонимаю.
Возникла необходимость организовать соединение между двумя точками при помощи IPSec VLAN. Со стороны "провайдера" мне дали
следующие данные:
VPN Gateway IP Address 185.17.24.19
VPN Device Description Cisco PIX-515E
Tunnel Configuration
Local IP address 10.160.22.44
Peer IP address 185.17.24.19
Phase 1
Authentication Method Pre-Shared Key
Encryption Scheme IKE
Diffie-Hellman Group Group 2
Encryption Algorithm 3DES
Hashing Algorithm SHA1
Main or Aggressive Mode Main mode
Lifetime (for renegotiation) 28800s
Phase 2
Encapsulation (ESP or AH) ESP
Encryption Algorithm 3DES
Authentication Algorithm SHA1
Perfect Forward Secrecy PFS PFS
Lifetime (for renegotiation) 3600s
Lifesize in KB (for renegotiation) 0
В свою очередь, я, руководствуясь этими данными и гуглом принялся за настройку соединения. В первую очередь создал скрипт
со следующим содержанием:
#!/sbin/setkey -f
flush;
spdflush;
# ESP
add 77.158.16.188 185.17.24.19 esp 15701 -E 3des-cbc "123456789012123456789012";
add 185.17.24.19 77.158.16.188 esp 24501 -E 3des-cbc "123456789012123456789012";
spdadd 77.158.16.188 185.17.24.19 any -P out ipsec
esp/transport//require;
spdadd 185.17.24.19 77.158.16.188 any -P in ipsec
esp/transport//require;
Затем запустив его вижу:
# setkey -D
185.17.24.19 77.158.16.188
esp mode=transport spi=24501(0x00005fb5) reqid=0(0x00000000)
E: 3des-cbc 31323334 35363738 39303132 31323334 35363738 39303132
seq=0x00000000 replay=0 flags=0x00000000 state=mature
created: Apr 8 18:03:55 2008 current: Apr 8 18:13:36 2008
diff: 581(s) hard: 0(s) soft: 0(s)
last: hard: 0(s) soft: 0(s)
current: 0(bytes) hard: 0(bytes) soft: 0(bytes)
allocated: 0 hard: 0 soft: 0
sadb_seq=1 pid=20881 refcnt=0
77.158.16.188 185.17.24.19
esp mode=transport spi=15701(0x00003d55) reqid=0(0x00000000)
E: 3des-cbc 31323334 35363738 39303132 31323334 35363738 39303132
seq=0x00000000 replay=0 flags=0x00000000 state=mature
created: Apr 8 18:03:55 2008 current: Apr 8 18:13:36 2008
diff: 581(s) hard: 0(s) soft: 0(s)
last: hard: 0(s) soft: 0(s)
current: 0(bytes) hard: 0(bytes) soft: 0(bytes)
allocated: 0 hard: 0 soft: 0
sadb_seq=0 pid=20881 refcnt=0
Вроде бы все верно. Приступаю к настройке racoon.conf, и привожу конфиг в такое состояние:
path include "/etc/racoon";
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
path script "/etc/racoon/scripts";
remote anonymous
{
exchange_mode main;
doi ipsec_doi;
situation identity_only;
my_identifier address;
lifetime time 28800 sec;
initial_contact on;
proposal_check obey;
proposal {
encryption_algorithm 3des;
hash_algorithm sha1;
authentication_method pre_shared_key;
dh_group 2 ;
}
}
sainfo anonymous
{
pfs_group 1;
lifetime time 28800 sec ;
encryption_algorithm 3des, blowfish 448, rijndael ;
authentication_algorithm hmac_sha1, hmac_md5 ;
compression_algorithm deflate ;
}
Естественно в /etc/racoon/psk.txt лежит:
185.17.24.19 ethFbg567gdfb0ab6eHfds213
Запускаю racoon, и пытаюсь выполнить:
# ping 10.160.22.44
6 packets transmitted, 0 received, 100% packet loss, time 4999ms
Как вы видите, ничего не выходит. Хотел спросить, что я делаю не так?