faq обучение настройка
Текущее время: Вт июл 22, 2025 22:02

Часовой пояс: UTC + 3 часа




Начать новую тему Ответить на тему  [ Сообщений: 3 ] 
Автор Сообщение
 Заголовок сообщения: Соедененние CentOS и Dlink DL804HV ipsec
СообщениеДобавлено: Вт июн 15, 2010 09:20 
Не в сети

Зарегистрирован: Вт авг 15, 2006 17:25
Сообщений: 13
Откуда: Москва
Добрый день, Уважаемые!
Возникла проблема при создания туннеля IPSEC между двумя офисами в разных городах, в сети "А" в роли шлюза выступает машина с CENTOS, в сети "Б" шлюз Dlink DL804HV, коннект не устанавливается.

Как настраивал
Сеть "А"
Центось настраивал по документации http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-ipsec-net2net-cfg.html
Создал скрипт

Код:
/etc/sysconfig/network-scripts/ifcfg-ipsec0
TYPE=IPSEC
ONBOOT=yes
IKE_METHOD=PSK
SRCGW=192.168.1.3
DSTGW=192.168.4.100
SRCNET=192.168.1.0/24
DSTNET=192.168.4.0/24
DST=Внешний_IP_Сети"В"


Создал ключ
Код:
/etc/sysconfig/network-scripts/keys-ipsec0


подредактировал /etc/racoon/racoon.conf
Код:
cat /etc/racoon/racoon.conf

# Racoon IKE daemon configuration file.
# See 'man racoon.conf' for a description of the format and entries.

path include "/etc/racoon";
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";

listen
{
isakmp Внешний IP Сети "А";
}
timer
{
        # These value can be changed per remote node.
        counter 5;              # maximum trying count to send.
        interval 10 sec;        # maximum interval to resend.
        persend 1;              # the number of packets per send.

        # maximum time to wait for completing each phase.
        phase1 30 sec;
        phase2 15 sec;
}
sainfo anonymous
{
        pfs_group 2;
        lifetime time 1 hour ;
        encryption_algorithm 3des ;
        authentication_algorithm hmac_md5 ;
        compression_algorithm deflate ;
}


в iptables добавил правила
Код:
-A INPUT -p udp --dport 500 -j ACCEPT
-A INPUT -p esp -j ACCEPT
-A INPUT -p ah -j ACCEPT


Сеть "Б"
Настройки длинка
Изображение


Изображение

Изображение

Логи
На CenOS


Код:
Jun 11 16:14:47 gate racoon: INFO: ISAKMP-SA expired IP_Сети"А"[500]-IP_Сети"Б"[500] spi:93143411b022d098:fce3dd7d75bedb4c
Jun 11 16:14:48 gate racoon: INFO: ISAKMP-SA deleted IP_Сети"А"[500]-IP_Сети"Б"[500] spi:93143411b022d098:fce3dd7d75bedb4c
Jun 11 16:14:56 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:15:16 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:15:17 gate racoon: ERROR: ignore information because the message is too short
Jun 11 16:15:17 gate racoon: INFO: respond new phase 1 negotiation: IP_Сети"А"[500]<=>IP_Сети"Б"[500]
Jun 11 16:15:17 gate racoon: INFO: begin Identity Protection mode.
Jun 11 16:15:17 gate racoon: WARNING: SPI size isn't zero, but IKE proposal.
Jun 11 16:15:18 gate racoon: INFO: ISAKMP-SA established IP_Сети"А"[500]-IP_Сети"Б"[500] spi:5eb7240d00fbfd7c:8f3443ee8221db9b
Jun 11 16:15:23 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:15:38 gate last message repeated 2 times
Jun 11 16:15:39 gate racoon: INFO: ISAKMP-SA expired IP_Сети"А"[500]-IP_Сети"Б"[500] spi:61df15843f2c5489:c741efe5058078c0
Jun 11 16:15:40 gate racoon: INFO: ISAKMP-SA deleted IP_Сети"А"[500]-IP_Сети"Б"[500] spi:61df15843f2c5489:c741efe5058078c0
Jun 11 16:15:48 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:16:08 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:16:09 gate racoon: ERROR: ignore information because the message is too short
Jun 11 16:16:09 gate racoon: INFO: respond new phase 1 negotiation: IP_Сети"А"[500]<=>IP_Сети"Б"[500]
Jun 11 16:16:09 gate racoon: INFO: begin Identity Protection mode.
Jun 11 16:16:09 gate racoon: WARNING: SPI size isn't zero, but IKE proposal.
Jun 11 16:16:10 gate racoon: INFO: ISAKMP-SA established IP_Сети"А"[500]-IP_Сети"Б"[500] spi:298c96b5ea2d2d1d:984221a1c0162df7
Jun 11 16:16:15 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:16:30 gate last message repeated 2 times
Jun 11 16:16:31 gate racoon: INFO: ISAKMP-SA expired IP_Сети"А"[500]-IP_Сети"Б"[500] spi:924c422945750807:21b0ba6f4bd9689d
Jun 11 16:16:32 gate racoon: INFO: ISAKMP-SA deleted IP_Сети"А"[500]-IP_Сети"Б"[500] spi:924c422945750807:21b0ba6f4bd9689d
Jun 11 16:16:40 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:17:00 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:17:01 gate racoon: ERROR: ignore information because the message is too short
Jun 11 16:17:01 gate racoon: INFO: respond new phase 1 negotiation: IP_Сети"А"[500]<=>IP_Сети"Б"[500]
Jun 11 16:17:01 gate racoon: INFO: begin Identity Protection mode.
Jun 11 16:17:01 gate racoon: WARNING: SPI size isn't zero, but IKE proposal.
Jun 11 16:17:02 gate racoon: INFO: ISAKMP-SA established IP_Сети"А"[500]-IP_Сети"Б"[500] spi:cceacb95d1d3f58e:3da5dedb5ad4a88b
Jun 11 16:17:07 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].
Jun 11 16:17:22 gate last message repeated 2 times
Jun 11 16:17:23 gate racoon: INFO: ISAKMP-SA expired IP_Сети"А"[500]-IP_Сети"Б"[500] spi:f112137207ec2077:98fb8622ac1db93e
Jun 11 16:17:24 gate racoon: INFO: ISAKMP-SA deleted IP_Сети"А"[500]-IP_Сети"Б"[500] spi:f112137207ec2077:98fb8622ac1db93e
Jun 11 16:17:32 gate racoon: NOTIFY: the packet is retransmitted by IP_Сети"Б"[500].



Логи
На Dlink
Код:
Friday June 11, 2010 15:28:09 IKED re-TX : IDINIT to IP_Сети"А"
Friday June 11, 2010 15:28:09 Receive IKE M6(IDRESP) : IP_Сети"А" --> IP_Сети"Б"
Friday June 11, 2010 15:28:09 ID error
Friday June 11, 2010 15:28:14 IKED re-TX : IDINIT to IP_Сети"А"
Friday June 11, 2010 15:28:14 Receive IKE M6(IDRESP) : IP_Сети"А" --> IP_Сети"Б"
Friday June 11, 2010 15:28:14 ID error
Friday June 11, 2010 15:28:24 IKED re-TX : IDINIT to IP_Сети"А"
Friday June 11, 2010 15:28:24 Receive IKE M6(IDRESP) : IP_Сети"А" --> IP_Сети"Б"
Friday June 11, 2010 15:28:24 ID error
Friday June 11, 2010 15:28:34 IKED re-TX : IDINIT to IP_Сети"А"
Friday June 11, 2010 15:28:34 Receive IKE M6(IDRESP) : IP_Сети"А" --> IP_Сети"Б"
Friday June 11, 2010 15:28:34 ID error
Friday June 11, 2010 15:28:54 IKED re-TX : IDINIT to IP_Сети"А"
Friday June 11, 2010 15:28:54 Receive IKE M6(IDRESP) : IP_Сети"А" --> IP_Сети"Б"
Friday June 11, 2010 15:28:54 ID error
Friday June 11, 2010 15:28:55 Send IKE (INFO) : delete IP_Сети"Б" -> IP_Сети"А" phase 1
Friday June 11, 2010 15:28:55 IKE phase1 (ISAKMP SA) remove : IP_Сети"Б" <-> IP_Сети"А"
Friday June 11, 2010 15:28:55 Send IKE M1(INIT) : IP_Сети"Б" --> IP_Сети"А"
Friday June 11, 2010 15:28:55 Receive IKE M2(RESP) : IP_Сети"А" --> IP_Сети"Б"
Friday June 11, 2010 15:28:55 Try to match with ENC:3DES AUTH:PSK HASH:SHA1 Group:Group2


Не как не могу понять в чем проблема, может кто сталкивался?


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Ср июн 16, 2010 10:04 
Не в сети

Зарегистрирован: Вт авг 15, 2006 17:25
Сообщений: 13
Откуда: Москва
Добился следующих результатов
Длинк не выдает никаких ошибок
на ЦентОС сыпятся следующие сообщения

Код:
Jun 15 15:36:55 gate racoon: ERROR: such policy already exists. anyway replace it: 192.168.4.0/24[0] 192.168.1.0/24[0] proto=any dir=fwd
Jun 15 15:36:57 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:000002b1
Jun 15 15:37:07 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:000002b1
Jun 15 15:37:12 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, b5286874ee9ef08b:adc354969d78e49e:0000cdbb
Jun 15 15:37:13 gate racoon: ERROR: unknown Informational exchange received.
Jun 15 15:37:13 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:0000103a
Jun 15 15:37:23 gate last message repeated 2 times
Jun 15 15:37:27 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:000002b1
Jun 15 15:37:28 gate racoon: ERROR: unknown Informational exchange received.
Jun 15 15:37:28 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:00000cc3
Jun 15 15:37:33 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:00000cc3
Jun 15 15:37:33 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:0000103a
Jun 15 15:37:38 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:00000cc3
Jun 15 15:37:43 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:0000103a
Jun 15 15:37:48 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:00000cc3
Jun 15 15:37:58 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:00000cc3
Jun 15 15:38:03 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:0000103a
Jun 15 15:38:04 gate racoon: ERROR: unknown Informational exchange received.
Jun 15 15:38:04 gate racoon: ERROR: can't start the quick mode, there is no ISAKMP-SA, 66910be5a66465a3:5d4797dcdc411b4c:0000083e


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Чт июн 17, 2010 09:24 
Не в сети

Зарегистрирован: Пт апр 27, 2007 17:46
Сообщений: 265
Откуда: Кишинев
По первым логам похоже, что длинк получает не тот remote id, что ожидает. А по второму - вы agressive mode на длинке включили? Тогда и с другой стороны его надо разрешить.


Вернуться наверх
 Профиль  
 
Показать сообщения за:  Сортировать по:  
Начать новую тему Ответить на тему  [ Сообщений: 3 ] 

Часовой пояс: UTC + 3 часа


Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 283


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB