Introduction To FreeS - WAN
Introduction To FreeS - WAN
Introduction To FreeS - WAN
http://www.freeswan.org/freeswan_trees/freeswan-2.06/doc/install.html
Installing FreeS/WAN
This document will teach you how to install Linux FreeS/WAN. If your distribution comes with Linux FreeS/WAN, we offer tips to get you started.
Requirements
To install FreeS/WAN you must: be running Linux with the 2.4 or 2.2 kernel series. See this kernel compatibility table. We also have experimental support for 2.6 kernels. There are two basic approaches, and this document covers both: install FreeS/WAN, including its KLIPS kernel code. You'll be using KLIPS in place of the existing 2.6 IPsec kernel support. install the FreeS/WAN userland tools (keying daemon and supporting scripts) for use with 2.6 kernel native IPsec, See also these known issues with 2.6. have root access to your Linux box choose the version of FreeS/WAN you wish to install based on mailing list reports
1 of 6
11/2/2011 10:54 AM
Introduction to FreeS/WAN
http://www.freeswan.org/freeswan_trees/freeswan-2.06/doc/install.html
where you replace xy.example.com with your machine's fully-qualified domain name. Generate some randomness, for example by wiggling your mouse, to speed the process. The resulting ipsec.secrets looks like:
: RSA { # RSA 2192 bits xy.example.com Sun Jun 8 13:42:19 2003 # for signatures only, UNSAFE FOR ENCRYPTION #pubkey=0sAQOFppfeE3cC7wqJi... Modulus: 0x85a697de137702ef0... # everything after this point is secret PrivateExponent: 0x16466ea5033e807... Prime1: 0xdfb5003c8947b7cc88759065... Prime2: 0x98f199b9149fde11ec956c814... Exponent1: 0x9523557db0da7a885af90aee... Exponent2: 0x65f6667b63153eb69db8f300dbb... Coefficient: 0x90ad00415d3ca17bebff123413fc518... } # do not change the indenting of that "}"
RPM install
These instructions are for a recent Red Hat or Fedora Core with a stock Red Hat or Fedora Core kernel. We know that Mandrake and SUSE also produce FreeS/WAN RPMs. If you're running either, install using your distribution's tools.
Download RPMs
Decide which functionality you need: standard FreeS/WAN RPMs. Use these shortcuts: (for 2.6 kernels: userland only) ncftpget ftp://ftp.xs4all.nl/pub/crypto/freeswan/binaries/RedHat-RPMs/\*userland* (for 2.4 kernels) ncftpget ftp://ftp.xs4all.nl/pub/crypto/freeswan/binaries/RedHat-RPMs/`uname -r | tr -d 'a-wy-z'`/\* or view all the offerings at our FTP site. Openswan (a FreeS/WAN code fork) RPMs, which include Andreas Steffen's X.509 patch and more. For 2.6 kernels, get the latest FreeS/WAN userland RPM, for example:
freeswan-userland-2.06.9-0.i386.rpm
Note: FreeS/WAN's support for 2.6 kernel IPsec is preliminary. Please see 2.6.known-issues, and the latest mailing list reports.
2 of 6
11/2/2011 10:54 AM
Introduction to FreeS/WAN
http://www.freeswan.org/freeswan_trees/freeswan-2.06/doc/install.html
Change to your new FreeS/WAN directory, and make and install the For 2.4 kernels, get both kernel and userland RPMs. Check your kernel version with
uname -r
Note: These modules will only work on the Red Hat or Fedora Core kernel they were built for, since they are very sensitive to small changes in the kernel. Get FreeS/WAN utilities to match. For example:
freeswan-userland-2.06_2.4.20_20.9-0.i386.rpm
If you're running RedHat 8.x or later, import this key into the RPM database:
rpm --import freeswan-rpmsign.asc
For RedHat 7.x systems, you'll need to add it to your PGP keyring:
pgp -ka freeswan-rpmsign.asc
To upgrade existing RPMs (and keep all .conf files in place), use:
rpm -Uvh freeswan*.rpm
If you're upgrading from FreeS/WAN 1.x to 2.x RPMs, and encounter problems, see this note.
3 of 6
11/2/2011 10:54 AM
Introduction to FreeS/WAN
http://www.freeswan.org/freeswan_trees/freeswan-2.06/doc/install.html
Download FreeS/WAN
Download the source tarball you've chosen, along with any patches.
Untar, unzip
As root, unpack your FreeS/WAN source into /usr/src.
su mv freeswan-2.06.tar.gz /usr/src cd /usr/src tar -xzf freeswan-2.06.tar.gz
Patch if desired
Now's the time to add any patches. The contributor may have special instructions, or you may simply use the patch command.
4 of 6
11/2/2011 10:54 AM
Introduction to FreeS/WAN
http://www.freeswan.org/freeswan_trees/freeswan-2.06/doc/install.html
Choose one of the methods below. Userland-only Install for 2.6 kernels Note: FreeS/WAN's support for 2.6 kernel IPsec is preliminary. Please see 2.6.known-issues, and the latest mailing list reports. Change to your new FreeS/WAN directory, and make and install the FreeS/WAN userland tools.
cd /usr/src/freeswan-2.06 make programs make install
Now, start FreeS/WAN and test your install. KLIPS install for 2.2, 2.4 and 2.6 kernels To make a modular version of KLIPS for 2.2 and 2.4 kernels, along with other FreeS/WAN programs you'll need, use a command sequence like the one below. This will change to your new FreeS/WAN directory, make the FreeS/WAN module (and other stuff), and install it all.
cd /usr/src/freeswan-2.06 make menumod # just save and exit make minstall
Start FreeS/WAN and test your install. To link KLIPS statically into your kernel on 2.2, 2.4 or 2.6 (using your old kernel settings), or to build a KLIPS module for 2.6, you'll need to patch the kernel itself. The following will change to your new FreeS/WAN directory, compile KLIPS into your kernel (and other stuff), and install it all.
cd /usr/src/freeswan-2.06 make [KERNELSRC=/usr/src/linux-2.6.1-1.47] menugo make minstall # just save and exit
The KERNELSRC argument is necessary for 2.6 kernels, as it defaults to /usr/src/linux-2.4. Reboot your system and test your install. For other ways to compile KLIPS, see our Makefile.
5 of 6
11/2/2011 10:54 AM
Introduction to FreeS/WAN
http://www.freeswan.org/freeswan_trees/freeswan-2.06/doc/install.html
If any of these first four checks fails, see our troubleshooting guide.
6 of 6
11/2/2011 10:54 AM