Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-2008, 06:38 PM
Lorenzo Vaina
 
Posts: n/a
IPSec Linux - Longhorn one way.

I've this (let's say strange) problem in a communication between one Linux
server with kernel 2.6.18-6 (Debian) and one Windows Server 2008
Enterprise; the policy requires AH with x.509 certificates. If the Linux
machine tries beginning the communication (on e new connection) the Quick
Mode SA negotiation fails (but the phase 1, main mode negotiation
succedes). When the communication begins from the Windows server, all go
just fine and from that moment, obviously, the communication works in both
ways.
In the syslog I can read:
racoon: ERROR: mismatched ID was returned.
racoon: ERROR: failed to pre-process packet.
racoon: ERROR: phase2 negotiation failed.
In the Windows event viewer i have one failure for any one Main mode
nagotiation (failed or succeded):
Event ID: 4976
Task Category: IPsec Main Mode
Level: Information
Keywords: Audit Failure
Description:
During Main Mode negotiation, IPsec received an invalid negotiation packet.
If this problem persists, it could indicate a network issue or an attempt
to modify or replay this negotiation.
Any idea?
Thanks.

--
Lorenzo Vaina,
MCSA Windows Server 2003,
MCTS SQL Server 2005.
messaggi privati: http://www.vaina.it/posta.html
Reply With Quote
  #2 (permalink)  
Old 07-09-2008, 06:31 AM
Burkhard Ott
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Am Tue, 08 Jul 2008 20:38:02 +0200 schrieb Lorenzo Vaina:

> I've this (let's say strange) problem in a communication between one Linux
> server with kernel 2.6.18-6 (Debian) and one Windows Server 2008
> Enterprise; the policy requires AH with x.509 certificates. If the Linux
> machine tries beginning the communication (on e new connection) the Quick
> Mode SA negotiation fails (but the phase 1, main mode negotiation
> succedes). When the communication begins from the Windows server, all go
> just fine and from that moment, obviously, the communication works in both
> ways.
> In the syslog I can read:
> racoon: ERROR: mismatched ID was returned.
> racoon: ERROR: failed to pre-process packet.
> racoon: ERROR: phase2 negotiation failed.
> In the Windows event viewer i have one failure for any one Main mode
> nagotiation (failed or succeded):
> Event ID: 4976
> Task Category: IPsec Main Mode
> Level: Information
> Keywords: Audit Failure
> Description:
> During Main Mode negotiation, IPsec received an invalid negotiation packet.
> If this problem persists, it could indicate a network issue or an attempt
> to modify or replay this negotiation.
> Any idea?
> Thanks.
>


check your phase2 proposals on debian.
Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 11:52 AM
Lorenzo Vaina
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Burkhard Ott scripsit:

> check your phase2 proposals on debian.


Thank you for your reply. I re-checked the sainfo stanza and it seems fine.
Oh, it's so simple:

sainfo anonymous
{
pfs_group modp2048;
lifetime time 15 min;
encryption_algorithm 3des,null_enc;
authentication_algorithm hmac_sha1;
compression_algorithm deflate;
}

I added null_enc as a fallback trying but obviously all I got was to load an
unsuitable module in my poor kernel memory.
I think that if something was wrong here, the opposite way communication
failed too.

Please, do you know with ID is referred to, in the stanza:
racoon: ERROR: mismatched ID was returned.
?

Thanks.

--
Lorenzo Vaina,
MCSA Windows Server 2003,
MCTS SQL Server 2005.
messaggi privati: http://www.vaina.it/posta.html
Reply With Quote
  #4 (permalink)  
Old 07-09-2008, 12:27 PM
Burkhard Ott
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Am Wed, 09 Jul 2008 13:52:01 +0200 schrieb Lorenzo Vaina:

> Burkhard Ott scripsit:
>
>> check your phase2 proposals on debian.

>
> Thank you for your reply. I re-checked the sainfo stanza and it seems fine.
> Oh, it's so simple:
>
> sainfo anonymous
> {
> pfs_group modp2048;
> lifetime time 15 min;
> encryption_algorithm 3des,null_enc;
> authentication_algorithm hmac_sha1;
> compression_algorithm deflate;
> }
>
> I added null_enc as a fallback trying but obviously all I got was to load an
> unsuitable module in my poor kernel memory.
> I think that if something was wrong here, the opposite way communication
> failed too.
>
> Please, do you know with ID is referred to, in the stanza:
> racoon: ERROR: mismatched ID was returned.
> ?
>
> Thanks.
>


Usually if no other ID is configured the IP is taken, bu tyou could also
set an ID with my_identifier.
Try also you IPSec without IPComp (compression_algorithm deflate;)
probably Windows doesn't like that.

cheers
Reply With Quote
  #5 (permalink)  
Old 07-09-2008, 07:32 PM
Lorenzo Vaina
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Burkhard Ott scripsit:

> Usually if no other ID is configured the IP is taken, bu tyou could also
> set an ID with my_identifier.


Please do you know witch ID is sent by the Windows side?

> Try also you IPSec without IPComp (compression_algorithm deflate;)
> probably Windows doesn't like that.


Setting a compression algorithm is mandatory in racoon. If it will use or
not use IPComp is setted at kernel level, if I'm not wrong.

> cheers


Thank you for your interesting.

--
Lorenzo Vaina,
MCSA Windows Server 2003,
MCTS SQL Server 2005.
messaggi privati: http://www.vaina.it/posta.html
Reply With Quote
  #6 (permalink)  
Old 07-10-2008, 06:58 AM
Burkhard Ott
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Am Wed, 09 Jul 2008 21:32:59 +0200 schrieb Lorenzo Vaina:

> Burkhard Ott scripsit:
>
>> Usually if no other ID is configured the IP is taken, bu tyou could also
>> set an ID with my_identifier.

>
> Please do you know witch ID is sent by the Windows side?


I assume the IP Adress, if not a ID configured.


>> Try also you IPSec without IPComp (compression_algorithm deflate;)
>> probably Windows doesn't like that.

>
> Setting a compression algorithm is mandatory in racoon. If it will use or
> not use IPComp is setted at kernel level, if I'm not wrong.


You are wrong. Thats might be the reason why windows can't read the packet
correctly.

cheers
Reply With Quote
  #7 (permalink)  
Old 07-10-2008, 08:23 AM
Lorenzo Vaina
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Burkhard Ott scripsit:

>> Setting a compression algorithm is mandatory in racoon. If it will use or
>> not use IPComp is setted at kernel level, if I'm not wrong.

>
> You are wrong. Thats might be the reason why windows can't read the packet
> correctly.


racoon: ERROR: /etc/racoon/racoon.conf:50: "}" no compression algorithm at
anonymous
racoon: ERROR: fatal parse failure (1 errors)

I found a Microsoft Knowledge Base article (950826) stating "You cannot
establish an IPsec connection between a Linux operating system and a
Windows Vista operating system when you initiate the connection from the
Linux operating system", but the cause description is a swithing of AH and
ESP order. However I use only AH and I have the same issue using ESP only.

>
> cheers

Thank you.

--
Lorenzo Vaina,
MCSA Windows Server 2003,
MCTS SQL Server 2005.
messaggi privati: http://www.vaina.it/posta.html
Reply With Quote
  #8 (permalink)  
Old 07-10-2008, 09:21 AM
Burkhard Ott
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Am Thu, 10 Jul 2008 10:23:43 +0200 schrieb Lorenzo Vaina:

> racoon: ERROR: /etc/racoon/racoon.conf:50: "}" no compression algorithm at
> anonymous
> racoon: ERROR: fatal parse failure (1 errors)


AFAIK The "compression_algorithm" option in the racoon.conf only specifies
the algorithm. Compression will not be used unless you enable it in the
SPD entry.

> I found a Microsoft Knowledge Base article (950826) stating "You cannot
> establish an IPsec connection between a Linux operating system and a
> Windows Vista operating system when you initiate the connection from the
> Linux operating system", but the cause description is a swithing of AH
> and ESP order. However I use only AH and I have the same issue using ESP
> only.


I've read the article, funny issue. Try to disable AH, esp is you payload.
My idea is when MS switch teh format to esp+ah instead of ah+esp, what
happens if there is no AH attached?
Maybe it helps.

cheers
Reply With Quote
  #9 (permalink)  
Old 07-10-2008, 01:10 PM
Lorenzo Vaina
 
Posts: n/a
Re: IPSec Linux - Longhorn one way.

Burkhard Ott scripsit:
>
> I've read the article, funny issue. Try to disable AH, esp is you payload.
> My idea is when MS switch teh format to esp+ah instead of ah+esp, what
> happens if there is no AH attached?
> Maybe it helps.
>
> cheers


I confirm that my problem is only with the Windows Server 2008 operating
system. If the Windows side is an older Microsoft system, all works as
expected.
I tried the configuration described in the Microsoft KB article and I found
that the communication is impossible in both way, not only if Linux is the
initiator. However I need only AH and I tried using only ESP without luck:
in every cases only Windows can initiate the connection.
Now I think this is a bug in the Microsoft operating system and I'm going to
write this result on the Microsoft Winserver group.
Thank you for your help. Please continue writing here if you (or somebody
else) have some other ideas.

--
Lorenzo Vaina,
MCSA Windows Server 2003,
MCTS SQL Server 2005.
messaggi privati: http://www.vaina.it/posta.html
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:35 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109