]> git.ipfire.org Git - thirdparty/iptables.git/blame - INSTALL
xtables-restore: Constify struct nft_xt_restore_cb
[thirdparty/iptables.git] / INSTALL
CommitLineData
d31a659e
JE
1Installation instructions for iptables
2======================================
8e3b892c 3
d31a659e 4iptables uses the well-known configure(autotools) infrastructure.
c5a2ce48 5
d31a659e
JE
6 $ ./configure
7 $ make
8 # make install
8e3b892c 9
8e3b892c 10
d31a659e
JE
11Prerequisites
12=============
f82070f9 13
d31a659e 14 * no kernel-source required
f82070f9 15
d31a659e
JE
16 * but obviously a compiler, glibc-devel and linux-kernel-headers
17 (/usr/include/linux)
f82070f9 18
f82070f9 19
d31a659e
JE
20Configuring and compiling
21=========================
429eafb7 22
d31a659e 23./configure [options]
429eafb7 24
d31a659e 25--prefix=
7fae6faf 26
d31a659e
JE
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.
7fae6faf 30
d31a659e 31--with-xtlibdir=
8e3b892c 32
d31a659e 33 The path to where Xtables extensions should be installed to. It
411a4e50 34 defaults to ${libdir}/xtables.
d31a659e
JE
35
36--enable-devel (or --disable-devel)
37
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.
41
42 It is enabled by default.
43
b79ec690
JE
44--enable-static
45
46 Produce additional binaries, iptables-static/ip6tables-static,
47 which have all shipped extensions compiled in.
48
49--disable-shared
50
51 Produce binaries that have dynamic loading of extensions disabled.
52 This implies --enable-static.
53 (See some details below.)
54
d31a659e
JE
55--enable-libipq
56
57 This option causes libipq to be installed into ${libdir} and
58 ${includedir}.
59
d31a659e
JE
60--with-ksource=
61
62 Xtables does not depend on kernel headers anymore, but you can
63 optionally specify a search path to include anyway. This is
64 probably only useful for development.
65
66If you want to enable debugging, use
67
68 ./configure CFLAGS="-ggdb3 -O0"
f82070f9 69
d31a659e
JE
70(-O0 is used to turn off instruction reordering, which makes debugging
71much easier.)
8e3b892c 72
7c7bf4c1
AP
73To show debug traces you can add -DDEBUG to CFLAGS option
74
3efb6ead 75
d31a659e
JE
76Other notes
77===========
9dd4cb06 78
d31a659e
JE
79The make process will automatically build multipurpose binaries.
80These have the core (iptables), -save, -restore and -xml code
81compiled into one binary, but extensions remain as modules.
9dd4cb06 82
b79ec690
JE
83
84Static and shared
85=================
86
87Basically there are three configuration modes defined:
88
89 --disable-static --enable-shared (this is the default)
90
91 Build a binary that relies upon dynamic loading of extensions.
92
93 --enable-static --enable-shared
94
95 Build a binary that has the shipped extensions built-in, but
96 is still capable of loading additional extensions.
97
98 --enable-static --disable-shared
99
100 Shipped extensions are built-in, and dynamic loading is
101 deactivated.