strongSwan on FreeBSD » History » Version 6
strongSwan on FreeBSD¶
This document describes how to install strongSwan on FreeBSD 7.2.
The generic FreeBSD kernel does not come with IPsec support. So you will have to compile your own kernel.
Also, the kernel sources do not include NAT traversal. If you need that, you'll have to apply a patch.
Then you will also need some additional packages to compile strongSwan.
Build the Kernel¶
Basic information on how to build a custom kernel can be found in the FreeBSD Handbook.
You'll need to add the following options to your kernel configuration file:
options IPSEC device crypto
You can verify that your kernel has IPsec support using the following command. Which should print a list of ipsec specific kernel state.
/sbin/sysctl -a | grep ipsec
If you need NAT Traversal, apply one of the patches provided by Yvan Vanhullebus. Then add the following option to your kernel config.
Our test-system was installed using the Developer and Kern-Developer distributions in sysinstall. So there are maybe additional packages required on your system.
The packages required to build strongSwan are as follows:
- Although FreeBSD supports the GNU specific register_printf_function function, the implementation in the C library contains a bug that prevents this from working in a multi-threaded application. Therefore the vstr string library is required.
Get the latest tarball and configure strongSwan as follows:
./configure --enable-kernel-pfkey --enable-kernel-pfroute --disable-kernel-netlink --enable-vstr \ --disable-tools --disable-scripts --disable-pluto --with-group=wheel --with-lib-prefix=/usr/local
- Due to the lack of policy based routes, virtual IPs can not be used (client-side).
- The kernel-pfroute interface lacks some final tweaks to fully support MOBIKE.