[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter contains information on how to prepare your system to support tinc.
2.1 Configuring the kernel | ||
2.2 Libraries |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you are running Linux, chances are good that your kernel already supports all the devices that tinc needs for proper operation. For example, the standard kernel from Redhat Linux already has support for ethertap and netlink compiled in. Debian users can use the modconf utility to select the modules. If your Linux distribution supports this method of selecting devices, look out for something called `ethertap', and `netlink_dev' if it is using a kernel version prior to 2.4.0. In that case you will need both these devices. If you are using kernel 2.4.0 or later, you need to select `tun'.
If you can install these devices in a similar manner, you may skip this section. Otherwise, you will have to recompile the kernel in order to turn on the required features. If you are unfamiliar with the process of configuring and compiling a new kernel, you should read the Kernel HOWTO first.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here are the options you have to turn on when configuring a new kernel:
Code maturity level options [*] Prompt for development and/or incomplete code/drivers Networking options [*] Kernel/User netlink socket <M> Netlink device emulation Network device support <M> Ethertap network tap |
If you want to run more than one instance of tinc or other programs that use the ethertap, you have to compile the ethertap driver as a module, otherwise you can also choose to compile it directly into the kernel.
If you decide to build any of these as dynamic kernel modules, it's a good idea to add these lines to `/etc/modules.conf':
alias char-major-36 netlink_dev alias tap0 ethertap options tap0 -o tap0 unit=0 alias tap1 ethertap options tap1 -o tap1 unit=1 ... alias tapN ethertap options tapN -o tapN unit=N |
Add as much alias/options lines as necessary.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here are the options you have to turn on when configuring a new kernel:
Code maturity level options [*] Prompt for development and/or incomplete code/drivers Network device support <M> Universal tun/tap device driver support |
It's not necessary to compile this driver as a module, even if you are going to run more than one instance of tinc.
If you have an early 2.4 kernel, you can choose both the tun/tap driver and the `Ethertap network tap' device. This latter is marked obsolete, and chances are that it won't even function correctly anymore. Make sure you select the universal tun/tap driver.
If you decide to build the tun/tap driver as a kernel module, add these lines to `/etc/modules.conf':
alias char-major-10-200 tun |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For FreeBSD version 4.1 and higher, the tap driver is included in the default kernel configuration, for earlier systems (4.0 and earlier), you need to install the universal tun/tap driver yourself.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For OpenBSD version 2.9 and higher, the tun driver is included in the default kernel configuration.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For NetBSD version 1.5.2 and higher, the tun driver is included in the default kernel configuration.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For Solaris 8 (SunOS 5.8) and higher, the tun driver may or may not be included in the default kernel configuration. If it isn't, the source can be downloaded from http://vtun.sourceforge.net/tun/. For x86 and sparc64 architectures, precompiled versions can be found at http://www.monkey.org/~dugsong/fragroute/. If the `net/if_tun.h' header file is missing, install it from the source package.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Darwin does not come with a tunnel driver. You must download it at http://chrisp.de/en/projects/tunnel.html. If compiling the source fails, try the binary module. The tunnel driver must be loaded before starting tinc with the following command:
kmodload tunnel |
Once loaded, the tunnel driver will automatically create `/dev/tun0'..`/dev/tun3' and the corresponding network interfaces.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You will need to install the CIPE-Win32 driver or the TAP-Win32 driver, it doesn't matter which one. You can download the CIPE driver from http://cipe-win32.sourceforge.net. Using the Network Connections control panel, configure the CIPE-Win32 or TAP-Win32 network interface in the same way as you would do from the tinc-up script as explained in the rest of the documentation.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Before you can configure or build tinc, you need to have the OpenSSL, zlib and lzo libraries installed on your system. If you try to configure tinc without having them installed, configure will give you an error message, and stop.
2.2.1 OpenSSL | ||
2.2.2 zlib | ||
2.2.3 lzo |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For all cryptography-related functions, tinc uses the functions provided by the OpenSSL library.
If this library is not installed, you wil get an error when configuring tinc for build. Support for running tinc without having OpenSSL installed may be added in the future.
You can use your operating system's package manager to install this if available. Make sure you install the development AND runtime versions of this package.
If you have to install OpenSSL manually, you can get the source code from http://www.openssl.org/. Instructions on how to configure, build and install this package are included within the package. Please make sure you build development and runtime libraries (which is the default).
If you installed the OpenSSL libraries from source, it may be necessary to let configure know where they are, by passing configure one of the --with-openssl-* parameters.
--with-openssl=DIR OpenSSL library and headers prefix --with-openssl-include=DIR OpenSSL headers directory (Default is OPENSSL_DIR/include) --with-openssl-lib=DIR OpenSSL library directory (Default is OPENSSL_DIR/lib) |
The complete source code of tinc is covered by the GNU GPL version 2. Since the license under which OpenSSL is distributed is not directly compatible with the terms of the GNU GPL http://www.openssl.org/support/faq.html#LEGAL2, we include an exemption to the GPL (see also the file COPYING.README) to allow everyone to create a statically or dynamically linked executable:
This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. You may provide binary packages linked to the OpenSSL libraries, provided that all other requirements of the GPL are met.
Since the LZO library used by tinc is also covered by the GPL, we also present the following exemption:
Hereby I grant a special exception to the tinc VPN project (http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library (http://www.openssl.org).Markus F.X.J. Oberhumer
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For the optional compression of UDP packets, tinc uses the functions provided by the zlib library.
If this library is not installed, you wil get an error when configuring tinc for build. Support for running tinc without having zlib installed may be added in the future.
You can use your operating system's package manager to install this if available. Make sure you install the development AND runtime versions of this package.
If you have to install zlib manually, you can get the source code from http://www.gzip.org/zlib/. Instructions on how to configure, build and install this package are included within the package. Please make sure you build development and runtime libraries (which is the default).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Another form of compression is offered using the lzo library.
If this library is not installed, you wil get an error when configuring tinc for build. Support for running tinc without having lzo installed may be added in the future.
You can use your operating system's package manager to install this if available. Make sure you install the development AND runtime versions of this package.
If you have to install lzo manually, you can get the source code from http://www.oberhumer.com/opensource/lzo/. Instructions on how to configure, build and install this package are included within the package. Please make sure you build development and runtime libraries (which is the default).
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |