source: postlfs/security/iptables.xml@ af167ffb

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 af167ffb was af167ffb, checked in by Randy McMurchy <randy@…>, 19 years ago

Added md5sum to iptables instructions

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

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