source: postlfs/security/iptables.xml@ 60ecc5bb

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 60ecc5bb was 60ecc5bb, checked in by Krejzi <krejzi@…>, 12 years ago

Mark some packages as 7.2 checked. Part 8 - Security.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@10556 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY iptables-download-http "http://www.netfilter.org/projects/iptables/files/iptables-&iptables-version;.tar.bz2">
8 <!ENTITY iptables-download-ftp "ftp://ftp.netfilter.org/pub/iptables/iptables-&iptables-version;.tar.bz2">
9 <!ENTITY iptables-md5sum "8bf564ea8348522fc1db727868828def">
10 <!ENTITY iptables-size "504 KB">
11 <!ENTITY iptables-buildsize "15 MB">
12 <!ENTITY iptables-time "0.2 SBU">
13]>
14
15<sect1 id="iptables" xreflabel="Iptables-&iptables-version;">
16 <?dbhtml filename="iptables.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Iptables-&iptables-version;</title>
24
25 <indexterm zone="iptables">
26 <primary sortas="a-Iptables">Iptables</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Iptables</title>
31
32 <para>
33 The next part of this chapter deals with firewalls. The principal
34 firewall tool for Linux is <application>Iptables</application>. You will
35 need to install <application>Iptables</application> if you intend on using
36 any form of a firewall.
37 </para>
38
39 &lfs72_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&iptables-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&iptables-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &iptables-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &iptables-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &iptables-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &iptables-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
76 <itemizedlist spacing="compact">
77 <listitem>
78 <para>
79 Required patch:
80 <ulink url="&patch-root;/iptables-&iptables-version;-missing-includes-1.patch"/>
81 </para>
82 </listitem>
83 </itemizedlist>
84
85 <para condition="html" role="usernotes">User Notes:
86 <ulink url="&blfs-wiki;/iptables"/>
87 </para>
88 </sect2>
89
90 <sect2 role="kernel" id="iptables-kernel">
91 <title>Kernel Configuration</title>
92
93 <para>
94 A firewall in Linux is accomplished through a portion of the
95 kernel called netfilter. The interface to netfilter is
96 <application>Iptables</application>. To use it, the appropriate
97 kernel configuration parameters are found in Networking Support &rArr;
98 Networking Options &rArr; Network Packet Filtering Framework.
99 </para>
100
101 <indexterm zone="iptables iptables-kernel">
102 <primary sortas="d-iptables">Iptables</primary>
103 </indexterm>
104
105 </sect2>
106
107 <sect2 role="installation">
108 <title>Installation of Iptables</title>
109
110 <note>
111 <para>
112 The installation below does not include building some specialized
113 extension libraries which require the raw headers in the
114 <application>Linux</application> source code. If you wish to build the
115 additional extensions (if you aren't sure, then you probably don't), you
116 can look at the <filename>INSTALL</filename> file to see an example of
117 how to change the <parameter>KERNEL_DIR=</parameter> parameter to point
118 at the <application>Linux</application> source code. Note that if you
119 upgrade the kernel version, you may also need to recompile
120 <application>Iptables</application> and that the BLFS team has not tested
121 using the raw kernel headers.
122 </para>
123
124 <para>
125 For some non-x86 architectures, the raw kernel headers may be
126 required. In that case, modify the <parameter>KERNEL_DIR=</parameter>
127 parameter to point at the <application>Linux</application> source
128 code.
129 </para>
130 </note>
131
132 <para>
133 Install <application>Iptables</application> by running the following
134 commands:
135 </para>
136
137<screen><userinput>patch -Np1 -i ../iptables-&iptables-version;-missing-includes-1.patch &amp;&amp;
138./configure --prefix=/usr \
139 --exec-prefix= \
140 --bindir=/sbin \
141 --with-xtlibdir=/lib/xtables \
142 --with-pkgconfigdir=/usr/lib/pkgconfig \
143 --enable-libipq \
144 --enable-devel &amp;&amp;
145make</userinput></screen>
146
147 <para>This package does not come with a test suite.</para>
148
149 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
150
151<screen role="root"><userinput>make install &amp;&amp;
152ln -sfv xtables-multi /sbin/iptables-xml</userinput></screen>
153
154 </sect2>
155
156 <sect2 role="commands">
157 <title>Command Explanations</title>
158
159 <para>
160 <parameter>--exec-prefix=</parameter>: Ensure all binaries and
161 libraries end up in <filename class="directory">/</filename>
162 directory tree.
163 </para>
164
165 <para>
166 <parameter>--bindir=/sbin</parameter>: Ensure all the executables go
167 in <filename class="directory">/sbin</filename>.
168 </para>
169
170 <para>
171 <parameter>--with-xtlibdir=/lib/xtables</parameter>: Ensure all
172 Iptables modules are installed in the
173 <filename class="directory">/lib/xtables</filename> directory.
174 </para>
175
176 <para>
177 <parameter>--with-pkgconfigdir=/usr/lib/pkgconfig</parameter>:
178 Ensure all the pkgconfig files are in the standard location.
179 </para>
180
181 <para>
182 <option>--enable-libipq</option>: This switch enables building
183 of <filename class="libraryfile">libipq.so</filename> which
184 can be used by some packages outside of BLFS.
185 </para>
186
187 <para>
188 <option>--enable-devel</option>: This switch enables installation
189 of <application>Iptables</application> development headers that
190 can be used by some packages outside of BLFS.
191 </para>
192
193 <para>
194 <command>ln -sfv xtables-multi /sbin/iptables-xml</command>: Ensure
195 the symbolic link for <command>iptables-xml</command> is relative.
196 </para>
197
198 </sect2>
199
200 <sect2 role="configuration">
201 <title>Configuring Iptables</title>
202
203 <para>
204 Introductory instructions for configuring your firewall are
205 presented in the next section: <xref linkend="fw-firewall"/>
206 </para>
207
208 <sect3 id="iptables-init">
209 <title>Boot Script</title>
210
211 <para>
212 To set up the iptables firewall at boot, install the
213 <filename>/etc/rc.d/init.d/iptables</filename> init script included
214 in the <xref linkend="bootscripts"/> package.
215 </para>
216
217 <indexterm zone="iptables iptables-init">
218 <primary sortas="f-iptables">iptables</primary>
219 </indexterm>
220
221<screen role="root"><userinput>make install-iptables</userinput></screen>
222
223 </sect3>
224
225 </sect2>
226
227 <sect2 role="content">
228 <title>Contents</title>
229
230 <segmentedlist>
231 <segtitle>Installed Programs</segtitle>
232 <segtitle>Installed Libraries</segtitle>
233 <segtitle>Installed Directories</segtitle>
234
235 <seglistitem>
236 <seg>
237 ip6tables, ip6tables-restore, ip6tables-save, iptables, iptables-restore,
238 iptables-save, iptables-xml and xtables-multi
239 </seg>
240 <seg>
241 libip4tc.so, libip6tc.so, libipq.so, libiptc.so and libxtables.so
242 </seg>
243 <seg>
244 /lib/xtables and /usr/include/libiptc
245 </seg>
246 </seglistitem>
247 </segmentedlist>
248
249 <variablelist>
250 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
251 <?dbfo list-presentation="list"?>
252 <?dbhtml list-presentation="table"?>
253
254 <varlistentry id="iptables-prog">
255 <term><command>iptables</command></term>
256 <listitem>
257 <para>
258 is used to set up, maintain, and inspect the tables of
259 IP packet filter rules in the Linux kernel.
260 </para>
261 <indexterm zone="iptables iptables-prog">
262 <primary sortas="b-iptables">iptables</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry id="iptables-restore">
268 <term><command>iptables-restore</command></term>
269 <listitem>
270 <para>
271 is used to restore IP Tables from data specified on
272 STDIN. Use I/O redirection provided by your
273 shell to read from a file.
274 </para>
275 <indexterm zone="iptables iptables-restore">
276 <primary sortas="b-iptables-restore">iptables-restore</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="iptables-save">
282 <term><command>iptables-save</command></term>
283 <listitem>
284 <para>
285 is used to dump the contents of an IP Table in easily
286 parseable format to STDOUT. Use I/O-redirection
287 provided by your shell to write to a file.
288 </para>
289 <indexterm zone="iptables iptables-save">
290 <primary sortas="b-iptables-save">iptables-save</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="iptables-xml">
296 <term><command>iptables-xml</command></term>
297 <listitem>
298 <para>
299 is used to convert the output of
300 <command>iptables-save</command> to an XML format. Using the
301 <filename>iptables.xslt</filename> stylesheet converts the XML
302 back to the format of <command>iptables-restore</command>.
303 </para>
304 <indexterm zone="iptables iptables-xml">
305 <primary sortas="b-iptables-xml">iptables-xml</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="ip6tables">
311 <term><command>ip6tables*</command></term>
312 <listitem>
313 <para>
314 are a set of commands for IPV6 that parallel the iptables
315 commands above.
316 </para>
317 <indexterm zone="iptables ip6tables">
318 <primary sortas="b-ip6tables">ip6tables</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 </variablelist>
324
325 </sect2>
326
327</sect1>
Note: See TracBrowser for help on using the repository browser.