source: postlfs/security/iptables.xml@ bf157fc2

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 bf157fc2 was bf157fc2, checked in by Bruce Dubbs <bdubbs@…>, 14 years ago

Update to iptables-1.4.7

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

  • Property mode set to 100644
File size: 9.8 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 "645941dd1f9e0ec1f74c61918d70d52f">
10 <!ENTITY iptables-size "456 KB">
11 <!ENTITY iptables-buildsize "10.5 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>The next part of this chapter deals with firewalls. The principal
33 firewall tool for Linux is <application>iptables</application>. You will
34 need to install <application>iptables</application> if you intend on using
35 any form of a firewall.</para>
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&iptables-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&iptables-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &iptables-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &iptables-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &iptables-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &iptables-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <para condition="html" role="usernotes">User Notes:
60 <ulink url="&blfs-wiki;/iptables"/></para>
61
62 </sect2>
63
64 <sect2 role="kernel" id='iptables-kernel'>
65 <title>Kernel Configuration</title>
66
67 <para>A firewall in Linux is accomplished through a portion of the
68 kernel called netfilter. The interface to netfilter is
69 <application>iptables</application>. To use it, the appropriate
70 kernel configuration parameters are found in Networking Support &rArr;
71 Networking Options &rArr; Network Packet Filtering Framework.</para>
72
73 <indexterm zone="iptables iptables-kernel">
74 <primary sortas="d-iptables">Iptables</primary>
75 </indexterm>
76
77 </sect2>
78
79 <sect2 role="installation">
80 <title>Installation of Iptables</title>
81
82 <note>
83 <para>The installation below does not include building some specialized
84 extension libraries which require the raw headers in the
85 <application>Linux</application> source code. If you wish to build the
86 additional extensions (if you aren't sure, then you probably don't), you
87 can look at the <filename>INSTALL</filename> file to see an example of
88 how to change the <parameter>KERNEL_DIR=</parameter> parameter to point
89 at the <application>Linux</application> source code. Note that if you
90 upgrade the kernel version, you may also need to recompile
91 <application>iptables</application> and that the BLFS team has not tested
92 using the raw kernel headers.</para>
93
94 <!-- <para>Installation of <application>iptables</application> will fail
95 if raw kernel headers are found in <filename
96 class='directory'>/usr/src/linux</filename> either as actual files
97 or a symlink. As of the Linux 2.6 kernel series, this directory
98 should no longer exist because appropriate headers were installed
99 from the <application>Linux-Libc-Headers</application> package during
100 the base LFS installation.</para> -->
101
102 <para>For some non-x86 architectures, the raw kernel headers may be
103 required. In that case, modify the <parameter>KERNEL_DIR=</parameter>
104 parameter to point at the <application>Linux</application> source
105 code.</para>
106 </note>
107
108 <para>Install <application>iptables</application> by running the following
109 commands:</para>
110
111<screen><userinput>./configure --prefix=/usr &amp;&amp;
112make</userinput></screen>
113
114 <para>This package does not come with a test suite.</para>
115
116 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
117
118<screen role="root"><userinput>make install</userinput></screen>
119
120 </sect2>
121<!--
122 <sect2 role="commands">
123 <title>Command Explanations</title>
124
125 <para><command>sed -i 's/name="$node/name="node/' iptables.xslt</command>:
126 This corrects a syntax error in the XSLT stylesheet for use with
127 <command>iptables-xml</command>.</para>
128
129 <para><parameter>PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</parameter>:
130 Compiles and installs <application>iptables</application> modules
131 into <filename class="directory">/lib</filename>, binaries into
132 <filename class="directory">/sbin</filename> and the remainder into
133 the <filename class="directory">/usr</filename> hierarchy instead of
134 <filename class="directory">/usr/local</filename>. Firewalls are
135 generally activated during the boot process and
136 <filename class="directory">/usr</filename> may not be mounted at
137 that time.</para>
138
139 <para><parameter>KERNEL_DIR=/usr</parameter>: This parameter is used to
140 point at the sanitized kernel headers in
141 <filename class='directory'>/usr</filename> and not use the raw kernel
142 headers in <filename class='directory'>/usr/src/linux</filename>.</para>
143
144 </sect2>
145-->
146 <sect2 role="configuration">
147 <title>Configuring Iptables</title>
148
149 <para>Introductory instructions for configuring your firewall are
150 presented in the next section: <xref linkend="fw-firewall"/></para>
151
152 <sect3 id="iptables-init">
153 <title>Boot Script</title>
154
155 <para>To set up the iptables firewall at boot, install the
156 <filename>/etc/rc.d/init.d/iptables</filename> init script included
157 in the <xref linkend="bootscripts"/> package.</para>
158
159 <indexterm zone="iptables iptables-init">
160 <primary sortas="f-iptables">iptables</primary>
161 </indexterm>
162
163<screen role="root"><userinput>make install-iptables</userinput></screen>
164
165 </sect3>
166
167 </sect2>
168
169 <sect2 role="content">
170 <title>Contents</title>
171
172 <segmentedlist>
173 <segtitle>Installed Programs</segtitle>
174 <segtitle>Installed Libraries</segtitle>
175 <segtitle>Installed Directories</segtitle>
176
177 <seglistitem>
178 <seg>iptables, iptables-restore, iptables-save, iptables-xml,
179 iptables-multi, ip6tables, ip6tables-restore, ip6tables-save,
180 and ip6tables-multii</seg>
181 <seg>libip4tc.so, libip6tc.so, libiptc.so, libxtables.so,
182 and numerous modules in /usr/libexec/xtables/</seg>
183 <seg>/usr/libexec/xtables and /usr/include/libiptc</seg>
184 </seglistitem>
185 </segmentedlist>
186
187 <variablelist>
188 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
189 <?dbfo list-presentation="list"?>
190 <?dbhtml list-presentation="table"?>
191
192 <varlistentry id="iptables-prog">
193 <term><command>iptables</command></term>
194 <listitem>
195 <para>is used to set up, maintain, and inspect the tables of
196 IP packet filter rules in the Linux kernel. It is a
197 symbolic link to iptables-multi.</para>
198 <indexterm zone="iptables iptables-prog">
199 <primary sortas="b-iptables">iptables</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="iptables-restore">
205 <term><command>iptables-restore</command></term>
206 <listitem>
207 <para>is used to restore IP Tables from data
208 specified on STDIN. Use I/O redirection provided by your
209 shell to read from a file. It is a symbolic link to
210 iptables-multi.</para>
211 <indexterm zone="iptables iptables-restore">
212 <primary sortas="b-iptables-restore">iptables-restore</primary>
213 </indexterm>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry id="iptables-save">
218 <term><command>iptables-save</command></term>
219 <listitem>
220 <para>is used to dump the contents of an IP Table
221 in easily parseable format to STDOUT. Use I/O-redirection
222 provided by your shell to write to a file. It is a symbolic link to
223 iptables-multi.</para>
224 <indexterm zone="iptables iptables-save">
225 <primary sortas="b-iptables-save">iptables-save</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="iptables-xml">
231 <term><command>iptables-xml</command></term>
232 <listitem>
233 <para>is used to convert the output of
234 <command>iptables-save</command> to an XML format. Using the
235 <filename>iptables.xslt</filename> stylesheet converts the XML
236 back to the format of <command>iptables-restore</command>.
237 It is a symbolic link to iptables-multi.</para>
238 <indexterm zone="iptables iptables-xml">
239 <primary sortas="b-iptables-xml">iptables-xml</primary>
240 </indexterm>
241 </listitem>
242 </varlistentry>
243
244 <varlistentry id="ip6tables">
245 <term><command>ip6tables*</command></term>
246 <listitem>
247 <para>are a set of commands for IPV6 that parallel the iptables
248 commands above. All of these commands are symbolic
249 links to ip6tables-multi.</para>
250 <indexterm zone="iptables ip6tables">
251 <primary sortas="b-ip6tables">ip6tables</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 </variablelist>
257
258 </sect2>
259
260</sect1>
Note: See TracBrowser for help on using the repository browser.