- Installing Dependencies
- Downloading the Code
- Compilation and Installation
Jool is seven binaries:
- Two kernel modules you can hook up to Linux. One of them is the SIIT implementation and the other one is the Stateful NAT64. They are the translating components and do most of the work.
- Two userspace clients which can be used to configure each module.
- Two shared objects that iptables uses to enable
iptables -j JOOL[_SIIT]-style rules.
- An optional userspace daemon that can synchronize state between different NAT64 Jool instances.
This document will explain how to compile and install all of that on most Linux distributions.
In following console segments,
$ indicates the command can be executed freely;
# means it requires admin privileges.
Kbuild vs DKMS
Before you start, you need to decide whether you will install the modules via Kbuild or DKMS.
Kbuild is Linux’s bare bones module building infrastructure, while DKMS is a more robust framework. Though Kbuild is easier to get started, DKMS is recommended because it has several other benefits. In particular, DKMS takes care of automatically recompiling the modules every time you update your kernel. (If, on the other hand, you choose Kbuild, you will have to do this manually.)
You need a kernel that is supported by the version of Jool that you’re using.
Aside from that, you will need your build essentials. Some distributions already ship them by default, so omit this step in those cases.
The modules need your kernel headers:
The userspace clients and the daemon need the Development Library and Headers for libnl-genl-3:
The iptables shared object needs the Netfilter xtables Library development files:
If you will install Jool via DKMS, you will need DKMS itself:
If you’re going to clone the git repository, you need git and the autotools:
And if you don’t, you will need a
.tar.gz extraction tool:
Downloading the Code
You have two options:
The repository version sometimes includes slight bugfixes not present in the latest official tarball, which you can access by sticking to the latest commit of the
master branch. (Tarballs and
master are considered stable, other branches are development.)
Compilation and Installation
Choose either Kbuild or DKMS; you don’t need both.
By the way: We’re aiming for completely immaculate code. If you get compilation warnings in your platform when you issue
make, please report them.
Installation via Kbuild
Let me say it again: A new kernel (including your distro’s automatic kernel updates) will obsolete the binaries generated here. If you insist on using Kbuild, you will need to recompile and reinstall Jool yourself whenever this happens.
Kernels 3.7 and up want you to sign your kernel modules to make sure you’re loading them in a responsible manner.
But if your kernel was not configured to require this feature (the kernels of many distros don’t), you won’t have much of an issue here. The output of
make installwill output “Can’t read private key”; this looks like an error, but is actually a warning, so you can continue the installation peacefully.
Sorry; if your kernel was compiled to require module signing, you probably know what you’re doing, so I’ll skip the instructions to make that work.
Installation via DKMS
With DKMS, the kernel modules and the userspace applications need to be installed separately.
This is how you compile and install the kernel modules:
And this is how you compile and install the userspace applications: