[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 2. Preparations

This chapter contains information on how to prepare your system to support tinc.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 2.1 Configuring the kernel

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.1.1 Configuration of Linux kernels

For tinc to work, you need a kernel that supports the Universal tun/tap device. Most distributions come with kernels that already support this. 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 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] | [ ? ]

### 2.1.2 Configuration of FreeBSD kernels

For FreeBSD version 4.1 and higher, tun and tap drivers are included in the default kernel configuration. The tap driver can be loaded with `kldload if_tap`, or by adding `if_tap_load="YES"` to ‘`/boot/loader.conf`’.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.1.3 Configuration of OpenBSD kernels

For OpenBSD version 2.9 and higher, the tun driver is included in the default kernel configuration. There is also a kernel patch from http://diehard.n-r-g.com/stuff/openbsd/ which adds a tap device to OpenBSD which should work with tinc, but with recent versions of OpenBSD, a tun device can act as a tap device by setting the link0 option with ifconfig.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.1.4 Configuration of NetBSD kernels

For NetBSD version 1.5.2 and higher, the tun driver is included in the default kernel configuration.

Tunneling IPv6 may not work on NetBSD’s tun device.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.1.5 Configuration of Solaris kernels

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] | [ ? ]

### 2.1.6 Configuration of Darwin (MacOS/X) kernels

Tinc on Darwin relies on a tunnel driver for its data acquisition from the kernel. Tinc supports either the driver from http://tuntaposx.sourceforge.net/, which supports both tun and tap style devices, and also the driver from from http://chrisp.de/en/projects/tunnel.html. The former driver is recommended. The tunnel driver must be loaded before starting tinc with the following command:

    kmodload tunnel

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.1.7 Configuration of Windows

You will need to install the latest TAP-Win32 driver from OpenVPN. You can download it from http://openvpn.sourceforge.net. Using the Network Connections control panel, configure the 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] | [ ? ]

## 2.2 Libraries

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.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.2.1 OpenSSL

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 with other cryptographic libraries 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)

#### License

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://www.tinc-vpn.org/) to link the LZO library with the OpenSSL library (http://www.openssl.org).

> Markus F.X.J. Oberhumer

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 2.2.2 zlib

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 running the configure script. You can either install the zlib library, or disable support for zlib compression by using the "–disable-zlib" option when running the configure script. Note that if you disable support for zlib, the resulting binary will not work correctly on VPNs where zlib compression is used.

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] | [ ? ]

### 2.2.3 lzo

Another form of compression is offered using the LZO library.

If this library is not installed, you wil get an error when running the configure script. You can either install the LZO library, or disable support for LZO compression by using the "–disable-lzo" option when running the configure script. Note that if you disable support for LZO, the resulting binary will not work correctly on VPNs where LZO compression is used.

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] | [ ? ]

This document was generated on May 11, 2014 using texi2html 1.82.