Привет всем.
У меня есть проблема с настройкой Ipsec для мобильных клиентов.
Мои конфиги:
setkey.conf
spdflush; spdadd 0.0.0.0/0 78.46.79.232/27 any -P out ipsec esp/tunnel/78.46.79.232-0.0.0.0/require; spdadd 78.46.79.232/27 0.0.0.0/0 any -P in ipsec esp/tunnel/0.0.0.0-78.46.79.232/require;
racoon.conf
path include "/etc/racoon";
path pre_shared_key "/etc/racoon/psk.txt";
log notify;
padding
{
maximum_length 20; # maximum padding length.
randomize off; # enable randomize length.
strict_check off; # enable strict check.
exclusive_tail off; # extract last one octet.
}
listen
{
isakmp 78.46.79.232 [500];
isakmp_natt 78.46.79.232 [4500];
adminsock disabled;
}
timer
{
counter 5; # maximum trying count to send.
interval 20 sec; # maximum interval to resend.
persend 1; # the number of packets per send.
phase1 30 sec;
phase2 15 sec;
}
remote anonymous
{
exchange_mode main,aggressive;
doi ipsec_doi;
situation identity_only;
my_identifier address 78.46.79.232;
peers_identifier fqdn "elastix.flexicam.com";
nonce_size 16;
lifetime time 3600 sec;
### lifetime time 24 hour;
initial_contact on;
proposal_check obey; # obey, strict, or claim
proposal {
encryption_algorithm 3des;
### hash_algorithm md5;
hash_algorithm sha1;
authentication_method pre_shared_key;
dh_group 2;
lifetime time 3600 sec;
}
}
sainfo anonymous
{
pfs_group 2;
lifetime time 3600 sec;
### lifetime time 24 hour;
encryption_algorithm 3des;
### authentication_algorithm hmac_md5;
authentication_algorithm hmac_sha1;
compression_algorithm deflate;
}
psk.txt
pizdec.net password
После запуска в дебаг режиме, вижу следующее:
2011-06-08 13:57:02: ERROR: no policy found: 10.71.10.71/32[0] 78.46.79.232/32[0] proto=any dir=in
2011-06-08 13:57:02: ERROR: failed to get proposal for responder.
2011-06-08 13:57:02: ERROR: failed to pre-process packet.
Где 10.71.10.71 локальный IP моего PC, тестирую клиентом "TheGreenBow IPSec VPN Client"
Спасибо за вашу помощь.
Конфиг клиента?
Конфиг клиента?
Не грусти, товарищ! Всё хорошо, beautiful good!
готово
Клиент GUI.
Смотрите пожалуйста скриншоты.
http://kosmoweb.net/phase1.png
http://kosmoweb.net/phase2.png
Все клиенты будут мобильные ака iPhone.
Спасибо.
Ясно, вроде как. Первая фаза
Ясно, вроде как. Вторая фаза не проходит из-за того, что нет правила обработки.
В setkey.conf ошибка, должно быть (маска у шлюза должна быть /32):
И, кстати на этой фазе должны быть уже локальные адреса, с которыми будет работать клиент.
Не грусти, товарищ! Всё хорошо, beautiful good!
сенкс
Ок, сенкс за советы.
Сейчас работает в таком виде. Сделал уже с сертификатом. Клиентский сертификат делал типа так:
./pkitool --pkcs12 iphone.example.de
/etc/racoon/setkey.conf
/etc/racoon/racoon.conf
path include "/etc/racoon"; #path pre_shared_key "/etc/racoon/psk.txt"; path certificate "/etc/racoon/certs"; log notify; padding { maximum_length 20; # maximum padding length. randomize off; # enable randomize length. strict_check off; # enable strict check. exclusive_tail off; # extract last one octet. } listen { isakmp 78.46.79.232 [500]; isakmp_natt 78.46.79.232 [4500]; adminsock disabled; } timer { counter 5; # maximum trying count to send. interval 20 sec; # maximum interval to resend. persend 1; # the number of packets per send. phase1 30 sec; phase2 15 sec; } remote anonymous { exchange_mode main; doi ipsec_doi; ca_type x509 "ca.crt"; certificate_type x509 "elastix.flexicam.com.crt" "elastix.flexicam.com.key"; send_cr on; verify_cert on; send_cert on; my_identifier asn1dn; nonce_size 16; lifetime time 3600 sec; ### lifetime time 24 hour; initial_contact on; nat_traversal on; generate_policy on; dpd_delay 25; proposal_check obey; # obey, strict, or claim proposal { encryption_algorithm aes 256; hash_algorithm sha1; authentication_method rsasig; dh_group 5; lifetime time 3600 sec; } } sainfo anonymous { lifetime time 3600 sec; encryption_algorithm aes 256; authentication_algorithm hmac_sha1; compression_algorithm deflate; }На сервере прописал виртуальный интерфейс вида:
tunctl -u root -t ipsec0
ifconfig ipsec0 10.10.0.1 netmask 255.255.255.255 mtu 1380
С сервера пингую свой локальный IP.
Клиенты будут все с динамическими IP.
Вопрос 1, как мне достучаться с клиента на сервер через туннель на IP 10.10.0.1 ??? не соображу что-то...
Вопрос 2, так как клиенты будут все Cisco VPN client ака на iPhone, тестирую связь на Cisco system VPN client 5.0.07 десктоп версии.
СВЯЗИ НЕТ !
В логах:
Всем спасибо за помощь.
Рановато в сертификаты
Рановато в сертификаты сиганул, сделай сначала базовое подключение по PSK.
Как я уже говорил, в setkey.conf должна уже находиться локальная сеть, в которую будет заруливаться шифрованный трафик. Из данных у тебя должно быть что-то такое:
spdadd 10.10.0.1/32 0.0.0.0/0 any -P out ipsec esp/tunnel/78.46.79.232-0.0.0.0/use;
spdadd 0.0.0.0/0 10.10.0.1/32 any -P in ipsec esp/tunnel/0.0.0.0-78.46.79.232/use;
Не грусти, товарищ! Всё хорошо, beautiful good!
winterheart
Нормально, это работает
Это не работает, не пингую сервак.