source: postlfs/security/iptables.xml@ f8962fe

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 f8962fe was f8962fe, checked in by Bruce Dubbs <bdubbs@…>, 19 years ago

Update iptables to version 1.3.1 and bootscripts to 20050310

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

  • Property mode set to 100644
File size: 8.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY iptables-download-http "http://www.iptables.org/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 "c3358a3bd0d7755df0b64a5063db296b">
10 <!ENTITY iptables-size "177 KB">
11 <!ENTITY iptables-buildsize "3.8 MB">
12 <!ENTITY iptables-time "0.14 SBU">
13]>
14
15<sect1 id="iptables" xreflabel="iptables-&iptables-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="iptables.html"?>
21<title>iptables-&iptables-version;</title>
22
23<indexterm zone="iptables">
24 <primary sortas="a-Iptables">Iptables</primary>
25</indexterm>
26
27<para>The next part of this chapter deals with firewalls. The principal
28firewall tool for Linux, as of the 2.4 kernel series, is
29<application>iptables</application>. It replaces
30<application>ipchains</application> from the 2.2 series and
31<application>ipfwadm</application> from the 2.0 series. You will need to
32install <application>iptables</application> if you intend on using any form of
33a firewall.</para>
34
35<sect2>
36<title>Introduction to <application>iptables</application></title>
37
38<para>To use a firewall, as well as installing
39<application>iptables</application>, you will need
40to configure the relevant options into your kernel. This is discussed
41in the next part of this chapter &ndash;
42<xref linkend="fw-kernel"/>.</para>
43
44<para>If you intend to use <acronym>IP</acronym>v6 you might consider extending
45the kernel by running <command>make patch-o-matic</command> in the top-level
46source tree directory of <application>iptables</application>. If you are
47going to do this, on a freshly untarred kernel, you need to run
48<command>yes "" | make config &amp;&amp; make dep</command> first because
49otherwise the patch-o-matic command is likely to fail while setting up
50some dependencies.</para>
51
52<para>If you are going to patch the kernel, you need to do it before you
53compile <application>iptables</application>, because during the compilation,
54the kernel source tree is checked (if it is available at <filename
55class="directory">/usr/src/linux-<replaceable>[version]</replaceable>
56</filename>) to see which features are available. Support will only be compiled
57into <application>iptables</application> for the features recognized at
58compile-time. Applying a kernel patch may result in errors, often because the
59hooks for the patches have changed or because the <command>runme</command>
60script doesn't recognize that a patch has already been incorporated.</para>
61
62<para>Note that for most people, patching the kernel is unnecessary.
63With the later 2.4.x kernels, most functionality is already available
64and those who need to patch it are generally those who need a specific
65feature; if you don't know why you need to patch the kernel, you're
66unlikely to need to!</para>
67
68<sect3>
69<title>Package information</title>
70<itemizedlist spacing='compact'>
71 <listitem><para>Download (HTTP): <ulink url="&iptables-download-http;"/></para></listitem>
72 <listitem><para>Download (FTP): <ulink url="&iptables-download-ftp;"/></para></listitem>
73 <listitem><para>Download MD5 sum: &iptables-md5sum;</para></listitem>
74 <listitem><para>Download size: &iptables-size;</para></listitem>
75 <listitem><para>Estimated disk space required: &iptables-buildsize;</para></listitem>
76 <listitem><para>Estimated build time: &iptables-time;</para></listitem>
77</itemizedlist>
78</sect3>
79
80</sect2>
81
82<sect2>
83<title>Installation of <application>iptables</application></title>
84
85<note>
86 <para>Installation of <application>iptables</application> will fail if raw
87 kernel headers are found in <filename
88 class='directory'>/usr/src/linux</filename> either as actual files or a
89 symlink. As of the Linux 2.6 kernel series, this directory should no longer
90 exist because appropriate headers were installed in the linux-libc-headers
91 package during the base <acronym>LFS</acronym> installation. </para>
92
93 <para>For some non-x86 architectures, the raw kernel headers may be required.
94 In that case, add the environment variable KERNEL_DIR=/usr/src/linux to the
95 make commands below.</para>
96</note>
97
98<para>Install <application>iptables</application> by running the following
99commands:</para>
100
101<screen><userinput><command>make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</command></userinput></screen>
102
103<para>Now, as the root user:</para>
104
105<screen><userinput role='root'><command>make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install</command></userinput></screen>
106
107</sect2>
108
109<sect2>
110<title>Command explanations</title>
111
112<para><parameter>PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</parameter>: Compiles
113and installs <application>iptables</application> libraries into
114<filename class="directory">/lib</filename>, binaries into
115<filename class="directory">/sbin</filename> and the remainder into the
116<filename class="directory">/usr</filename> hierarchy instead of
117<filename class="directory">/usr/local</filename>. Firewalls are
118generally activated during the boot process and
119<filename class="directory">/usr</filename> may not be mounted at that
120time.</para>
121
122</sect2>
123
124<sect2>
125<title>Contents</title>
126
127<segmentedlist>
128<segtitle>Installed Programs</segtitle>
129<segtitle>Installed Libraries</segtitle>
130<segtitle>Installed Directory</segtitle>
131
132<seglistitem>
133<seg>iptables, iptables-restore, iptables-save and ip6tables</seg>
134<seg>libip6t_*.so and libipt_*.so</seg>
135<seg>/lib/iptables</seg>
136</seglistitem>
137</segmentedlist>
138
139<variablelist>
140<bridgehead renderas="sect3">Short Descriptions</bridgehead>
141<?dbfo list-presentation="list"?>
142
143<varlistentry id="iptables-prog">
144 <term><command>iptables</command></term>
145 <listitem><para>is used to set up, maintain, and inspect the tables of
146 <acronym>IP</acronym> packet filter rules in the Linux kernel.</para>
147 <indexterm zone="iptables iptables-prog">
148 <primary sortas="b-iptables">iptables</primary>
149 </indexterm>
150 </listitem>
151</varlistentry>
152
153<varlistentry id="iptables-restore">
154 <term><command>iptables-restore</command></term>
155 <listitem><para>is used to restore <acronym>IP</acronym> Tables from data
156 specified on <acronym>STDIN</acronym>. Use I/O redirection provided by your
157 shell to read from a file.</para>
158 <indexterm zone="iptables iptables-restore">
159 <primary sortas="b-iptables-restore">iptables-restore</primary>
160 </indexterm>
161 </listitem>
162</varlistentry>
163
164<varlistentry id="iptables-save">
165 <term><command>iptables-save</command></term>
166 <listitem><para>is used to dump the contents of an <acronym>IP</acronym> Table
167 in easily parseable format to <acronym>STDOUT</acronym>. Use I/O-redirection
168 provided by your shell to write to a file.</para>
169 <indexterm zone="iptables iptables-save">
170 <primary sortas="b-iptables-save">iptables-save</primary>
171 </indexterm>
172 </listitem>
173</varlistentry>
174
175<varlistentry id="ip6tables">
176 <term><command>ip6tables</command></term>
177 <listitem><para>is used to set up, maintain, and inspect the tables of
178 <acronym>IP</acronym>v6 packet filter rules in the Linux kernel. Several
179 different tables may be defined. Each table contains a number of built-in
180 chains and may also contain user-defined chains.</para>
181 <indexterm zone="iptables ip6tables">
182 <primary sortas="b-ip6tables">ip6tables</primary>
183 </indexterm>
184 </listitem>
185</varlistentry>
186
187<varlistentry id="libip-iptables">
188 <term><filename class='libraryfile'>libip*.so</filename></term>
189 <listitem><para>library modules are various modules (implemented as dynamic
190 libraries) which extend the core functionality of
191 <command>iptables</command>.</para>
192 <indexterm zone="iptables libip-iptables">
193 <primary sortas="c-libip-iptables">libip*.so</primary>
194 </indexterm>
195 </listitem>
196</varlistentry>
197
198</variablelist>
199</sect2>
200</sect1>
Note: See TracBrowser for help on using the repository browser.