The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Индекс форумов
Составление сообщения

Исходное сообщение
"Проблема при настройки  GRE + IPSEC на Linux и Cisco."
Отправлено Apolo, 22-Мрт-10 11:35 
Всем доброго дня.
Есть проблема котору никак не могу решить и видать просто что то пропустил. Но сам увидеть ошибку не могу.  Потому решил попросить Вас посмотреть на конфиг и подсказать где я туплю!

И так задача: Есть сервак в WAN зоне и есть Cisco которая прокидывает пакеты во внутреннею сеть.
1.Подымаем GRE туннель на обоих устройствах. Здесь проблем нету и все пашет нормально.
2.Теперь подымаем IPSEC! И тут начинаются приколы. (Iptables отключен )

Если первым делает запрос Linux то Cisco выдает ошибку:
Dec  1 08:20:29: %CRYPTO-6-IKMP_MODE_FAILURE: Processing of Quick mode failed wi
th peer at 10.1.0.2

И вот что пишет Linux:
Mar 22 10:32:18 debian racoon: ERROR: fatal NO-PROPOSAL-CHOSEN notify messsage, phase1 should be deleted.
Mar 22 10:32:18 debian racoon: ERROR: Message: '4 u` : uc 8 m3 '.
Mar 22 10:32:33 debian racoon: ERROR: 10.1.0.1 give up to get IPsec-SA due to time up to wait.


А если наоборот Cisco является инициатором, то шифрование начинает работать.

И вот вопрос почему так и где ошибка в конфиге???

Конфиг Cisco:
!
! Last configuration change at 08:18:01 KIEV Sat Nov 28 2009
!
version 12.3
service timestamps debug datetime msec localtime
service timestamps log datetime localtime
service password-encryption
!
hostname el
!
boot-start-marker
boot-end-marker
!
logging buffered 4096 debugging
!
memory-size iomem 20
clock timezone KIEV 2
clock summer-time KIEV recurring last Sun Mar 3:00 last Sun Oct 4:00
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
voice-card 2
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
no ip domain lookup
ip domain name el
ip audit po max-events 100
no ftp-server write-enable
!
!
voice call carrier capacity active
!
!
!
!
!
!
!
!
!
!
!
username cisco secret 5 $1$DDRH$ZTvrjWxnNQok8KI2.41vj1
!
!
crypto isakmp policy 50
encr 3des
authentication pre-share
group 2
crypto isakmp key superkey address 0.0.0.0 0.0.0.0
crypto isakmp keepalive 120
!
!
crypto ipsec transform-set VPN_linux esp-3des esp-sha-hmac
!
crypto map VPN_IP_VPN 10 ipsec-isakmp
set peer 10.1.0.2
set transform-set VPN_linux
set pfs group2
match address 151
!
!
interface Tunnel1
bandwidth 384
ip address 192.168.100.1 255.255.255.0
ip mtu 1400
tunnel source Ethernet1/0
tunnel destination 10.1.0.2
crypto map VPN_IP_VPN
!
!
!
interface Ethernet1/0
ip address 10.1.0.1 255.255.255.0
half-duplex
crypto map VPN_IP_VPN
!
!
ip classless
ip route 192.168.100.0 255.255.255.0 10.1.0.2
!
no ip http server
no ip http secure-server
!
!
access-list 151 permit gre host 10.1.0.1 host 10.1.0.2
access-list 151 permit gre host 10.1.0.2 host 10.1.0.1
!
end

Конфиг Linux:
Файл psk.txt
# IPv4/v6 addresses
10.1.0.1    superkey

Файл racoon.conf
# $KAME: racoon.conf.in,v 1.18 2001/08/16 06:33:40 itojun Exp $

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 ::1 [7000];
    isakmp 10.1.0.2 [500];
    #admin [7002];        # administrative port for racoonctl.
    #strict_address;     # requires that all addresses must be bound.
}

timer
{
    # These value can be changed per remote node.
    counter 5;        # maximum trying count to send.
    interval 20 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;
}
#remote anonymous
remote 10.1.0.1
{
    exchange_mode main,aggressive;
    doi ipsec_doi;
    situation identity_only;

    my_identifier address 10.1.0.2;
    #certificate_type x509 "my.cert.pem" "my.key.pem";

    nonce_size 16;
    initial_contact on;
    proposal_check obey;    # obey, strict, or claim

    proposal {
        encryption_algorithm 3des;
        hash_algorithm sha1;
        authentication_method pre_shared_key;
        dh_group 2;
    }
}
sainfo anonymous
#sainfo address 10.1.0.2 any address 10.1.0.1 any
{
    pfs_group 2;
    lifetime time 30 sec;
    encryption_algorithm 3des;
    authentication_algorithm hmac_sha1;
    compression_algorithm deflate;
}

Файл  ipsec-tools.conf
#!/usr/sbin/setkey -f

flush;
spdflush;

spdadd 10.1.0.2 10.1.0.1 any -P out ipsec esp/tunnel/10.1.0.2-10.1.0.1/require;
spdadd 10.1.0.1 10.1.0.2 any -P in ipsec esp/tunnel/10.1.0.1-10.1.0.2/require;

 

Ваше сообщение
Имя*:
EMail:
Для отправки новых сообщений в текущей нити на email укажите знак ! перед адресом, например, !user@host.ru (!! - не показывать email).
Более тонкая настройка отправки ответов производится в профиле зарегистрированного участника форума.
Заголовок*:
Сообщение*:
  Введите код, изображенный на картинке: КОД
 
При общении не допускается: неуважительное отношение к собеседнику, хамство, унизительное обращение, ненормативная лексика, переход на личности, агрессивное поведение, обесценивание собеседника, провоцирование флейма голословными и заведомо ложными заявлениями. Не отвечайте на сообщения, явно нарушающие правила - удаляются не только сами нарушения, но и все ответы на них. Лог модерирования.



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру