]> git.ipfire.org Git - thirdparty/nftables.git/blob - INSTALL
tests: py: Fix some JSON equivalents
[thirdparty/nftables.git] / INSTALL
1 Installation instructions for nftables
2 ======================================
3
4 Prerequisites
5 =============
6
7 - build tooling: glibc headers, gcc, autotools, automake, libtool, pkg-config.
8
9 - libmnl: git://git.netfilter.org/libmnl.git
10
11 - libnftnl: git://git.netfilter.org/libnftnl.git
12
13 - flex
14
15 - bison
16
17 - libgmp: alternatively, see mini-gmp support below.
18
19 - libreadline or libedit or linenoise: required by interactive command line
20
21 - optional: libxtables: required to interact with iptables-compat
22
23 - optional: libjansson: required to build JSON support
24
25 - optional: asciidoc: required for building man-page
26
27 Configuring and compiling
28 =========================
29
30 Run "sh autogen.sh" to generate the configure script, then:
31
32 sh configure [options]
33
34 --prefix=
35
36 The prefix to put all installed files under. It defaults to
37 /usr/local, so the binaries will go into /usr/local/bin, sbin,
38 manpages into /usr/local/share/man, etc.
39
40 --datarootdir=
41
42 The base directory for arch-independent files. Defaults to
43 $prefix/share.
44
45 --disable-debug
46
47 Disable debugging
48
49 --with-mini-gmp
50
51 Use builtin mini-gmp instead of linking with a shared libgmp.
52 This is useful for embedded platforms optimizing for size and
53 having no other use for libgmp.
54 Note: This decreases the debugging verbosity in some files.
55
56 --with-xtables
57
58 For libxtables support to interact with the iptables-compat
59 utility.
60
61 --without-cli
62
63 To disable interactive command line support, ie. -i/--interactive.
64
65 --with-cli=readline
66
67 To enable interactive command line support with libreadline.
68
69 --with-cli=linenoise
70
71 To enable interactive command line support with linenoise.
72
73 --with-cli=editline
74
75 To enable interactive command line support with libedit.
76
77 --with-json
78
79 To enable JSON support, this requires libjansson.
80
81 Run "make" to compile nftables, "make install" to install it in the
82 configured paths.
83
84 Python support
85 ==============
86
87 CPython bindings are available for nftables under the py/ folder. They can be
88 installed using pip:
89
90 python -m pip install py/
91
92 A legacy setup.py script can also be used:
93
94 ( cd py && python setup.py install )
95
96 However, this method is deprecated.
97
98 Source code
99 ===========
100
101 Netfilter's Linux kernel tree can be found at:
102
103 git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git/
104 https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
105
106 The latest version of this code can be found at:
107
108 git://git.netfilter.org/nftables.git