Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26796 - ipsec-tools ebuild
Summary: ipsec-tools ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Jay Pfeifer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-17 05:57 UTC by fbusse
Modified: 2003-12-16 10:06 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ipsec-tools-0.2.2 ebuild (ipsec-tools-0.2.2.ebuild,503 bytes, text/plain)
2003-08-17 05:57 UTC, fbusse
Details
My version the ebuild (ipsec-tools-0.2.2.ebuild,903 bytes, text/plain)
2003-08-26 01:33 UTC, Sébastien ESTIENNE
Details
racoon for /etc/conf.d (racoon.conf.d,261 bytes, text/plain)
2003-08-26 01:33 UTC, Sébastien ESTIENNE
Details
raccon file for /etc/init.d (racoon.init.d,329 bytes, text/plain)
2003-08-26 01:34 UTC, Sébastien ESTIENNE
Details
racoon.conf.d (racoon.conf.d,330 bytes, text/plain)
2003-08-29 08:19 UTC, Sébastien ESTIENNE
Details
racoon.init.d (racoon.init.d,766 bytes, text/plain)
2003-08-29 08:20 UTC, Sébastien ESTIENNE
Details
Sample pre-shared key config file (psk.txt,487 bytes, text/plain)
2003-09-22 19:05 UTC, Jason McCormick
Details
Sample pre-shared key config file (psk.txt,487 bytes, text/plain)
2003-09-22 19:06 UTC, Jason McCormick
Details
Altered init.d script for racoon that checks for psk security. (racoon.init.d-alt,1.10 KB, text/plain)
2003-09-22 19:06 UTC, Jason McCormick
Details
Alternate conf.d/racoon config file that includes a PSK location. (racoon.conf.d-alt,369 bytes, text/plain)
2003-09-22 19:08 UTC, Jason McCormick
Details
setkey.conf for tunnel mode (setkey.conf,260 bytes, text/plain)
2003-12-01 10:56 UTC, Georg Müller
Details
racoon.conf for tunnel mode (x509 certs) (racoon.conf,1.79 KB, text/plain)
2003-12-01 11:00 UTC, Georg Müller
Details
Tarball containing ipsec-tools/* (ipsec-tools-0.2.2.tar,10.00 KB, application/octet-stream)
2003-12-14 15:32 UTC, Bernhard Schmidt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fbusse 2003-08-17 05:57:03 UTC
Kernel 2.5/2.6 have a built.-in IPsec-stack. To use the new IPsec-stack, we'll need 
the ipsec-tools (alternative would be isakmpd from OpenBSD, but it doesn't compile 
well) which contain the IKE-daemon racoon (KAME) and the SAD-tool setkey. 
Since racoon doesn't like any CFLAGS or HOST-settings, I had to unset them, but I 
don't think, that will cause any performance-impact since the real IPsec-stuff is 
handled in the kernel. 
I tested both racoon and setkey on x86, no problem establishing a tunnel (tested 
AES, 3DES and Blowfish) and host-to-host. 
But should definitly marked testing until 2.6.0 becomes stable.
Comment 1 fbusse 2003-08-17 05:57:32 UTC
Created attachment 16211 [details]
ipsec-tools-0.2.2 ebuild
Comment 2 Sébastien ESTIENNE 2003-08-26 01:31:48 UTC
Hello,

I wrote an isakmpd ebuild:
http://bugs.gentoo.org/show_bug.cgi?id=27278

And i also wrote an ebuild for ipsec tools (didn't know, yours already exist)
I wrote some init script for racoon,i don't know if you'll find this usefull.

I attached them so you can chek it.
Comment 3 Sébastien ESTIENNE 2003-08-26 01:33:25 UTC
Created attachment 16624 [details]
My version the ebuild

You can get the install part of the init.d and conf.d files
Comment 4 Sébastien ESTIENNE 2003-08-26 01:33:51 UTC
Created attachment 16626 [details]
racoon for /etc/conf.d
Comment 5 Sébastien ESTIENNE 2003-08-26 01:34:14 UTC
Created attachment 16627 [details]
raccon file for /etc/init.d
Comment 6 fbusse 2003-08-26 08:28:34 UTC
Looks OK, but the init-script is quite useless without a way to call setkey and the 
according policy. Without that, racoon won't start properly. 
Comment 7 Sébastien ESTIENNE 2003-08-29 08:15:48 UTC
I did a new version of the init.d that call setkey before starting racoon
tell me what you think about it.
Comment 8 Sébastien ESTIENNE 2003-08-29 08:19:59 UTC
Created attachment 16764 [details]
racoon.conf.d
Comment 9 Sébastien ESTIENNE 2003-08-29 08:20:45 UTC
Created attachment 16766 [details]
racoon.init.d
Comment 10 fbusse 2003-08-29 08:31:02 UTC
Looks good, no complaints from my side :) 
Comment 11 Jason McCormick 2003-09-22 19:05:23 UTC
I would submit that the ebuild for ipsec-tools should also include a sample pre-shared key file and also provide security checks for that file on the system.   The PSK file that's called with the path command in racoon.conf needs to exist and be mode 400 for proper operation.  Basically I've made the following proposed changes:

* Added RACOON_PSK_FILE in /etc/conf.d/racoon
* Added a security and sanity check for the file in /etc/init.d/racoon
* Included a sample PSK file

If you defaultly specify /etc/racoon/psk.txt in the provided conf.d file and everything's commented out, then you have no problems with default configurations that don't use PSK and provide a valuable security check for people who aren't aware of the sucurity needs for this file.


Just a thought....
Comment 12 Jason McCormick 2003-09-22 19:05:56 UTC
Created attachment 18182 [details]
Sample pre-shared key config file
Comment 13 Jason McCormick 2003-09-22 19:06:07 UTC
Created attachment 18183 [details]
Sample pre-shared key config file
Comment 14 Jason McCormick 2003-09-22 19:06:59 UTC
Created attachment 18184 [details]
Altered init.d script for racoon that checks for psk security.
Comment 15 Jason McCormick 2003-09-22 19:08:25 UTC
Created attachment 18185 [details]
Alternate conf.d/racoon config file that includes a PSK location.
Comment 16 Georg Müller 2003-11-26 08:49:01 UTC
Why isn't it yet in the portage tree?

It works fine for me - I use it with x509-certs to connect to a freeswan server.
Comment 17 Jay Pfeifer (RETIRED) gentoo-dev 2003-11-27 21:08:39 UTC
that's a good question. let me see about getting this added...
Comment 18 Sébastien ESTIENNE 2003-11-28 01:37:05 UTC
In the ipsec familly...
Why not adding this one too:
http://bugs.gentoo.org/show_bug.cgi?id=27278
Comment 19 Georg Müller 2003-12-01 10:56:41 UTC
Created attachment 21547 [details]
setkey.conf for tunnel mode

this is from my setkey.conf using with x509 certs

I also want to add the following to the racoon - init-scripts in the
stop-section:

--begin--
flush;
spdflush;
-- end --
Comment 20 Georg Müller 2003-12-01 11:00:21 UTC
Created attachment 21548 [details]
racoon.conf for tunnel mode (x509 certs)

I use this config to connect to an ipsec-freeswan-gateway (yyy.yyy.yyy.yyy)
My own ip is xxx.xxx.xxx.xxx 

(also in setkey.conf)
Comment 21 Georg Müller 2003-12-13 08:43:18 UTC
hm, what is the reason why ipsec-tools doesn't go into portage tree?
Comment 22 Brian Jackson (RETIRED) gentoo-dev 2003-12-13 08:52:58 UTC
If a developer adds an ebuild he is ultimately responsible for it's upkeep, so devs tend to not add stuff they don't use because they may be unable to maintain it properly. When I get some more people added to the team, I'm going to try to get all these utils (this one and others) added and kept up to date. Thanks for all the hard work on this, hopefully it won't be too much longer.
Comment 23 Tim Yamin (RETIRED) gentoo-dev 2003-12-13 14:49:56 UTC
Can somebody stick this into a tarball as there seem to be too many attachments; so I can commit into Portage?
Comment 24 Bernhard Schmidt 2003-12-14 15:32:18 UTC
Created attachment 22224 [details]
Tarball containing ipsec-tools/*

Here we go...

The tarball basically contains

- the slightly altered ebuild (id=16211) by Fridtjof Busse. The changes were
  * reverted from econf back to configure due to python being a cpu pig
    when using econf (it failed here after running configure for more than
    five minutes). 
  * DEPENDs on "virtual/glibc". I'm not quite sure whether ipsec-tools depends
    on openssl, too.
  * Install the setkey.conf by Georg M
Comment 25 Bernhard Schmidt 2003-12-14 15:32:18 UTC
Created attachment 22224 [details]
Tarball containing ipsec-tools/*

Here we go...

The tarball basically contains

- the slightly altered ebuild (id=16211) by Fridtjof Busse. The changes were
  * reverted from econf back to configure due to python being a cpu pig
    when using econf (it failed here after running configure for more than
    five minutes). 
  * DEPENDs on "virtual/glibc". I'm not quite sure whether ipsec-tools depends
    on openssl, too.
  * Install the setkey.conf by Georg Müller (id=21547) as
/etc/ipsec.conf.sample

- the unaltered initscript (id=18184) and conf.d-file (id=18185) by Jason 
  McCormick

TODO:
- Test :-)
- Patch the manpages racoon.8 and racoon.conf.5 to use "/etc" instead of
  "/usr/local/v6/etc"
- ChangeLog
- Something else?

The ebuild works fine on my gateway at home and correctly negotiates an IPsec
connection to my iBook, so I assume it will do what it should.
Comment 26 Jason McCormick 2003-12-14 20:28:25 UTC
  This looks good to me.  I'd still recommend putting in a sample pre-shared key because I think a lot of people using the VPN are going to be using PSK.  As long as it's commented out of ipsec.conf it doesn't really affect anything.
Comment 27 Bernhard Schmidt 2003-12-15 02:13:01 UTC
There already are sample configs for racoon (a racoon.conf and a psk.txt) installed by the ipsec-tools makefile itself.

dir /etc/racoon
obj /etc/racoon/racoon.conf 36215d029879a12920fef5bf6254b97b 1071417749
obj /etc/racoon/psk.txt.dist f42a2efd32941ff33e88b0dea1731ddd 1071417749
obj /etc/racoon/racoon.conf.dist 36215d029879a12920fef5bf6254b97b 1071417749
obj /etc/racoon/psk.txt f42a2efd32941ff33e88b0dea1731ddd 1071417749

Hmm, perhaps we should patch the makefile to install the .dist-versions only?
Comment 28 Tim Yamin (RETIRED) gentoo-dev 2003-12-16 10:06:24 UTC
Now in portage in `net-firewall'. Thanks a lot for everybody involved; sorry for the long wait and grief!