source: postlfs/security/iptables.xml@ 7112a9d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 7112a9d was 7112a9d, checked in by Bruce Dubbs <bdubbs@…>, 18 years ago

Updated to iptables-1.3.5

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

  • Property mode set to 100644
File size: 8.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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 "00fb916fa8040ca992a5ace56d905ea5">
10 <!ENTITY iptables-size "187 KB">
11 <!ENTITY iptables-buildsize "5.0 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 <keywordset>
22 <keyword role="package">iptables-&iptables-version;.tar</keyword>
23 <keyword role="ftpdir">iptables</keyword>
24 </keywordset>
25 </sect1info>
26
27 <title>Iptables-&iptables-version;</title>
28
29 <indexterm zone="iptables">
30 <primary sortas="a-Iptables">Iptables</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Iptables</title>
35
36 <para>The next part of this chapter deals with firewalls. The principal
37 firewall tool for Linux, as of the 2.4 kernel series, is
38 <application>iptables</application>. It replaces
39 <application>ipchains</application> from the 2.2 series and
40 <application>ipfwadm</application> from the 2.0 series. You will need to
41 install <application>iptables</application> if you intend on using any
42 form of a firewall.</para>
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>Download (HTTP): <ulink url="&iptables-download-http;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download (FTP): <ulink url="&iptables-download-ftp;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download MD5 sum: &iptables-md5sum;</para>
54 </listitem>
55 <listitem>
56 <para>Download size: &iptables-size;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated disk space required: &iptables-buildsize;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated build time: &iptables-time;</para>
63 </listitem>
64 </itemizedlist>
65
66 <para condition="html" role="usernotes">User Notes:
67 <ulink url="&blfs-wiki;/iptables"/></para>
68
69</sect2>
70
71 <sect2 role="kernel" id='iptables-kernel'>
72 <title>Kernel Configuration</title>
73
74 <para>A firewall in Linux is accomplished through a portion of the
75 kernel called netfilter. The interface to netfilter is
76 <application>iptables</application>. To use it, the appropriate
77 kernel configuration parameters are found in Device Drivers -&gt;
78 Networking Support -&gt; Networking Options -&gt;
79 Network Packet Filtering -&gt; IP: Netfilter Configuration.</para>
80
81 <indexterm zone="iptables iptables-kernel">
82 <primary sortas="d-iptables">Iptables</primary>
83 </indexterm>
84
85 </sect2>
86
87 <sect2 role="installation">
88 <title>Installation of Iptables</title>
89
90 <note>
91 <para>Installation of <application>iptables</application> will fail
92 if raw kernel headers are found in <filename
93 class='directory'>/usr/src/linux</filename> either as actual files
94 or a symlink. As of the Linux 2.6 kernel series, this directory
95 should no longer exist because appropriate headers were installed
96 from the <application>Linux-Libc-Headers</application> package during
97 the base LFS installation.</para>
98
99 <para>For some non-x86 architectures, the raw kernel headers may be
100 required. In that case, add the environment variable
101 <envar>KERNEL_DIR=/usr/src/linux</envar> to the make commands below.</para>
102 </note>
103
104 <para>Install <application>iptables</application> by running the following
105 commands:</para>
106
107<screen><userinput>make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</userinput></screen>
108
109 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
110
111<screen role="root"><userinput>make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install</userinput></screen>
112
113 </sect2>
114
115 <sect2 role="commands">
116 <title>Command Explanations</title>
117
118 <para><parameter>PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</parameter>:
119 Compiles and installs <application>iptables</application> libraries
120 into <filename class="directory">/lib</filename>, binaries into
121 <filename class="directory">/sbin</filename> and the remainder into
122 the <filename class="directory">/usr</filename> hierarchy instead of
123 <filename class="directory">/usr/local</filename>. Firewalls are
124 generally activated during the boot process and
125 <filename class="directory">/usr</filename> may not be mounted at
126 that time.</para>
127
128 </sect2>
129
130 <sect2 role="configuration">
131 <title>Configuring Iptables</title>
132
133 <para>Introductory instructions for configuring your firewall are
134 presented in the next section: <xref linkend='fw-firewall'/></para>
135
136 <sect3 id="iptables-init">
137 <title>Boot Script</title>
138
139 <para>To set up the iptables firewall at boot, install the
140 <filename>/etc/rc.d/init.d/iptables</filename> init script included
141 in the <xref linkend="bootscripts"/> package.</para>
142
143 <indexterm zone="iptables iptables-init">
144 <primary sortas="f-iptables">iptables</primary>
145 </indexterm>
146
147<screen role="root"><userinput>make install-iptables</userinput></screen>
148
149 </sect3>
150
151 </sect2>
152
153 <sect2 role="content">
154 <title>Contents</title>
155
156 <segmentedlist>
157 <segtitle>Installed Programs</segtitle>
158 <segtitle>Installed Libraries</segtitle>
159 <segtitle>Installed Directory</segtitle>
160
161 <seglistitem>
162 <seg>iptables, iptables-restore, iptables-save and ip6tables</seg>
163 <seg>libip6t_*.so and libipt_*.so</seg>
164 <seg>/lib/iptables</seg>
165 </seglistitem>
166 </segmentedlist>
167
168 <variablelist>
169 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
170 <?dbfo list-presentation="list"?>
171 <?dbhtml list-presentation="table"?>
172
173 <varlistentry id="iptables-prog">
174 <term><command>iptables</command></term>
175 <listitem>
176 <para>is used to set up, maintain, and inspect the tables of
177 IP packet filter rules in the Linux kernel.</para>
178 <indexterm zone="iptables iptables-prog">
179 <primary sortas="b-iptables">iptables</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="iptables-restore">
185 <term><command>iptables-restore</command></term>
186 <listitem>
187 <para>is used to restore IP Tables from data
188 specified on STDIN. Use I/O redirection provided by your
189 shell to read from a file.</para>
190 <indexterm zone="iptables iptables-restore">
191 <primary sortas="b-iptables-restore">iptables-restore</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="iptables-save">
197 <term><command>iptables-save</command></term>
198 <listitem>
199 <para>is used to dump the contents of an IP Table
200 in easily parseable format to STDOUT. Use I/O-redirection
201 provided by your shell to write to a file.</para>
202 <indexterm zone="iptables iptables-save">
203 <primary sortas="b-iptables-save">iptables-save</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="ip6tables">
209 <term><command>ip6tables</command></term>
210 <listitem>
211 <para>is used to set up, maintain, and inspect the tables of
212 IPv6 packet filter rules in the Linux kernel. Several different
213 tables may be defined. Each table contains a number of built-in
214 chains and may also contain user-defined chains.</para>
215 <indexterm zone="iptables ip6tables">
216 <primary sortas="b-ip6tables">ip6tables</primary>
217 </indexterm>
218 </listitem>
219 </varlistentry>
220
221 <varlistentry id="libip-iptables">
222 <term><filename class='libraryfile'>libip*.so</filename></term>
223 <listitem>
224 <para>library modules are various modules (implemented as dynamic
225 libraries) which extend the core functionality of
226 <command>iptables</command>.</para>
227 <indexterm zone="iptables libip-iptables">
228 <primary sortas="c-libip-iptables">libip*.so</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 </variablelist>
234
235 </sect2>
236
237</sect1>
Note: See TracBrowser for help on using the repository browser.