iptables: refer to dmesg when we hit error
[jleu-iptables.git] / INSTALL
blob4a44989e0375aa3651a715828683e7c84a72f169
1 Installation instructions for iptables
2 ======================================
4 iptables uses the well-known configure(autotools) infrastructure.
6         $ ./configure
7         $ make
8         # make install
11 Prerequisites
12 =============
14         * no kernel-source required
16         * but obviously a compiler, glibc-devel and linux-kernel-headers
17           (/usr/include/linux)
20 Configuring and compiling
21 =========================
23 ./configure [options]
25 --prefix=
27         The prefix to put all installed files under. It defaults to
28         /usr/local, so the binaries will go into /usr/local/bin, sbin,
29         manpages into /usr/local/share/man, etc.
31 --with-xtlibdir=
33         The path to where Xtables extensions should be installed to. It
34         defaults to ${prefix}/libexec/xtables.
36 --enable-devel (or --disable-devel)
38         This option causes development files to be installed to
39         ${includedir}, which is needed for building additional packages,
40         such as Xtables-addons or other 3rd-party extensions.
42         It is enabled by default.
44 --enable-libipq
46         This option causes libipq to be installed into ${libdir} and
47         ${includedir}.
49 --enable-static
51         Enable building single standalone multipurpose binaries,
52         (iptables-static and ip6tables-static), which contain every
53         extension compiled-in (and does not support additional
54         extensions).
56 --with-ksource=
58         Xtables does not depend on kernel headers anymore, but you can
59         optionally specify a search path to include anyway. This is
60         probably only useful for development.
62 If you want to enable debugging, use
64         ./configure CFLAGS="-ggdb3 -O0"
66 (-O0 is used to turn off instruction reordering, which makes debugging
67 much easier.)
70 Other notes
71 ===========
73 The make process will automatically build multipurpose binaries.
74 These have the core (iptables), -save, -restore and -xml code
75 compiled into one binary, but extensions remain as modules.
77 If you want to build a statically linked version of the iptables binary,
78 without the need for loading the plugins at runtime (e.g. for an
79 embedded device or router-on-a-disk), you can use the --enable-static
80 configure flag.