Bug 478746 - can't establish IPSEC link with multiple networks behind a tunnel
can't establish IPSEC link with multiple networks behind a tunnel
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ipsec-tools (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-04 10:26 EST by Vadym Chepkov
Modified: 2010-06-28 09:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 07:03:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Vadym Chepkov 2009-01-04 10:26:53 EST
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 04:35:11 EST
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 00:31:30 EST
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 00:32:30 EST
Created attachment 328251 [details]
racoon.conf on VPN server
Comment 4 Vadym Chepkov 2009-01-06 00:33:18 EST
Created attachment 328252 [details]
racoon.conf on VPN client
Comment 5 Vadym Chepkov 2009-01-06 00:33:55 EST
Created attachment 328253 [details]
setkey.conf on VPN client
Comment 6 Need Real Name 2009-01-26 04:50:22 EST
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 05:38:56 EST
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 08:32:54 EST
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 09:07:08 EST
Have you tried openswan instead of ipsec-tools for IPSEC?
Comment 10 Need Real Name 2009-11-18 10:13:35 EST
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 10:57:36 EST
(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 11:45:07 EST
I will try openswan
Comment 13 Vadym Chepkov 2009-11-18 18:25:43 EST
Is there support for openswan in initscripts?
ifup-ipsec seems using setkey only.
Comment 14 Tomas Mraz 2009-11-19 04:12:09 EST
(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 11:08:31 EST
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 15:00:06 EST
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 16:29:22 EST
I have sent patches for this upstream, so it will be fixed in next release.
Comment 18 Need Real Name 2009-11-20 18:17:50 EST
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 08:40:18 EDT
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 07:03:32 EDT
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 09:40:21 EDT
same problem in F13

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