Bug 478746 - can't establish IPSEC link with multiple networks behind a tunnel
Summary: can't establish IPSEC link with multiple networks behind a tunnel
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: ipsec-tools
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-04 15:26 UTC by Vadym Chepkov
Modified: 2010-06-28 13:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 11:03:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
racoon.conf on VPN server (783 bytes, text/plain)
2009-01-06 05:32 UTC, Vadym Chepkov
no flags Details
racoon.conf on VPN client (1.22 KB, text/plain)
2009-01-06 05:33 UTC, Vadym Chepkov
no flags Details
setkey.conf on VPN client (370 bytes, text/plain)
2009-01-06 05:33 UTC, Vadym Chepkov
no flags Details

Description Vadym Chepkov 2009-01-04 15:26:53 UTC
ipsec-tools-0.7.1-6.fc10.i386 (but it's true for Redhat EL with ipsec-tools-0.6.5-9.el5_2.3 as well)

If there are multiple networks behind the same tunnel (i.e 10/8 and 192.168/16) it's impossible to establish IPSEC link to both of them at the same time.

If the first packet goes to first network proper SAD entries are added and you can communicate with first network. Then you try to communicate with second network, for some reason duplicate entries are getting added to SAD, but connection with second network fails. Flush SAD entries, send first packet to second network and you can work only with it.

Comment 1 Tomas Mraz 2009-01-05 09:35:11 UTC
Is this a regression? I mean if you try previous releases of ipsec-tools from Fedora (http://koji.fedoraproject.org/koji/packageinfo?packageID=160) does it work with some older builds (for example ipsec-tools-0.7-13.fc9)?

Comment 2 Vadym Chepkov 2009-01-06 05:31:30 UTC
No, as I said, this is a problem for Redhat EL as well, I had this problem for awhile (at least since Fedora 5) and I thought this is a limitation of ipsec-tools package, so I was using openvpn instead. But I discovered it does work in FreeBSD (I know I should not brought it up, but I really want it to work in Linux as well) and FreeBSD uses ipsec-tools-0.7.1 with no patches at all.

I built a test case at home, I had to use NAT-T configuration, but I checked it without NAT-T and it doesn't work as well. I will attach my configuration files.

Comment 3 Vadym Chepkov 2009-01-06 05:32:30 UTC
Created attachment 328251 [details]
racoon.conf on VPN server

Comment 4 Vadym Chepkov 2009-01-06 05:33:18 UTC
Created attachment 328252 [details]
racoon.conf on VPN client

Comment 5 Vadym Chepkov 2009-01-06 05:33:55 UTC
Created attachment 328253 [details]
setkey.conf on VPN client

Comment 6 Need Real Name 2009-01-26 09:50:22 UTC
There is a similar bug with two tunnels:
https://bugzilla.redhat.com/show_bug.cgi?id=481529
I think this is the kernel problem.
At least BSD looks to be working with multiple tunnels OK.

Comment 7 Bug Zapper 2009-11-18 10:38:56 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Need Real Name 2009-11-18 13:32:54 UTC
The problem still exists in F11, F12
It is possible to establish an IPSEC link, but IPSEC VPN 
is very unstable
https://bugzilla.redhat.com/show_bug.cgi?id=481529
I think it is hopeless ho fix Linux IPSEC at all.
So I started migration to openvpn, which is more stable & reliable.
The only problem - few routers support openvpn, but some do.

So I consider Linux IPSEC not fixable on Linux and should not be used at all.

Comment 9 Tomas Mraz 2009-11-18 14:07:08 UTC
Have you tried openswan instead of ipsec-tools for IPSEC?

Comment 10 Need Real Name 2009-11-18 15:13:35 UTC
No, I did not try openswan because it is not a part of fedora 
standard distribution.
There is no openswan in 
http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/
I consider local maintainance of a package which is not part of the distribution to be a waste of time.


And, looking at symptoms,
I believe the problem is not only with ipsec-tools, but with ipsec linux kernel code also.
And this is one of the main reason why I consider IPSEC on linux unfixable in principle.

To fix IPSEC you need to find a person who:
1. Familiar with ipsec itself, which is complex and bloated by design.
2. Familiar with linux kernel network, because ipsec is tightly integrated with the kernel.
3. Have time and able to work with bug reported, what is hard because bugs are hard to reproduce because of bloat and complexity of ipsec.

In this sense migration to openvpn significantly increase the pool of people
able to work on it (and fix bugs), because
1. The openvpn standard itself it much simplier, there is much less code.
2. There is no kernel code in openvpn, so no kernel experience is required.

Comment 11 Tomas Mraz 2009-11-18 15:57:36 UTC
(In reply to comment #10)
> No, I did not try openswan because it is not a part of fedora 
> standard distribution.
> There is no openswan in 
> http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/
> I consider local maintainance of a package which is not part of the
> distribution to be a waste of time.

But it is there and for a long time. 
For example:
ftp://ftp.linux.cz/pub/linux/fedora/linux/releases/10/Everything/source/SRPMS/openswan-2.6.18-2.fc10.src.rpm
http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/openswan-2.6.23-1.fc12.src.rpm

> And, looking at symptoms,
> I believe the problem is not only with ipsec-tools, but with ipsec linux kernel
> code also.
> And this is one of the main reason why I consider IPSEC on linux unfixable in
> principle.
I think some kernel IPSEC guys would disagree with you. There are some limitations on ipsec-tools due to ipsec-tools using a deprecated pfkey interface to the kernel. Openswan on the other hand uses the fully supported xfrm API.

> To fix IPSEC you need to find a person who:
> 1. Familiar with ipsec itself, which is complex and bloated by design.
Not that I disagree with that.

> 2. Familiar with linux kernel network, because ipsec is tightly integrated with
> the kernel.
> 3. Have time and able to work with bug reported, what is hard because bugs are
> hard to reproduce because of bloat and complexity of ipsec.
> 
> In this sense migration to openvpn significantly increase the pool of people
> able to work on it (and fix bugs), because
> 1. The openvpn standard itself it much simplier, there is much less code.
> 2. There is no kernel code in openvpn, so no kernel experience is required.  

OK, I am definitely not here to convince you against using openvpn, I like its simplicity too.

Comment 12 Need Real Name 2009-11-18 16:45:07 UTC
I will try openswan

Comment 13 Vadym Chepkov 2009-11-18 23:25:43 UTC
Is there support for openswan in initscripts?
ifup-ipsec seems using setkey only.

Comment 14 Tomas Mraz 2009-11-19 09:12:09 UTC
(In reply to comment #13)
> Is there support for openswan in initscripts?
> ifup-ipsec seems using setkey only.  

Avesh, can you please answer how is openswan configured to be started during system startup?

Comment 15 Avesh Agarwal 2009-11-19 16:08:31 UTC
By default, Openswan (specifically pluto) is started at start up. Connection establishment is controlled by /etc/ipsec.conf and /etc/ipsec.d/*.conf . There is a parameter "auto", which if set to "start" in the *.conf files, can also initiate connections at startup. But currently there is no ifup-* script for Openswan. 

Thanks
Avesh

Comment 16 Need Real Name 2009-11-19 20:00:06 UTC
I will look at it, but I did not manage to start openswan right away.

I get some strange errors in syslog
Nov 19 14:51:14 localhost ipsec__plutorun: 034 esp string error: Non alphanum or valid separator found in auth string, just after "aes256-sha1" (old_state=ST_AA)

and this is on these two lines I copied exactly from man ipsec.conf
ike="aes256-sha1;modp1024"
phase2alg="aes256-sha1;modp1536"

this is on ";" after the aes256-sha1

Comment 17 Avesh Agarwal 2009-11-20 21:29:22 UTC
I have sent patches for this upstream, so it will be fixed in next release.

Comment 18 Need Real Name 2009-11-20 23:17:50 UTC
If you put them somewhere I can apply them, 
or, better option, just create .src.rpm (with the patch) and put it to
http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/

Comment 19 Bug Zapper 2010-04-27 12:40:18 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 20 Bug Zapper 2010-06-28 11:03:32 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 21 Need Real Name 2010-06-28 13:40:21 UTC
same problem in F13


Note You need to log in before you can comment on or make changes to this bug.