source: postlfs/security/iptables.xml@ e66f475

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

Added note to remove /usr/src/linux in iptables install instructions

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

  • Property mode set to 100644
File size: 7.6 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 "0a5f5f226e41ce408a895bec995e8c05">
10 <!ENTITY iptables-size "157 KB">
11 <!ENTITY iptables-buildsize "4.4 MB">
12 <!ENTITY iptables-time "0.13 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<indexterm zone="iptables">
23<primary sortas="a-Iptables">Iptables</primary>
24</indexterm>
25
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
28<application>iptables</application>. It replaces
29<application>ipchains</application> from the 2.2 series and
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
40in the next part of this chapter &ndash;
41<xref linkend="fw-kernel"/>.</para>
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
45source tree directory of <application>iptables</application>. If you are
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
58hooks for the patches have changed or because the <command>runme</command>
59script doesn't recognize that a patch has already been incorporated.</para>
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>
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:
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
86<note><para>Installation of <application>iptables</application> will fail if raw kernel headers are
87found in <filename class='directory'>/usr/src/linux</filename> either as actual files or a symlink.
88As of the Linux 2.6 kernel series, this directory should no longer exist because appropriate headers
89were installed in the linux-libc-headers package during the base <acronym>LFS</acronym> installation.
90</para></note>
91
92<para>Install <application>iptables</application> by running the following
93commands:</para>
94
95<screen><userinput><command>make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</command></userinput></screen>
96
97<para>Now, as the root user:</para>
98
99<screen><userinput role='root'><command>make PREFIX=/usr LIBDIR=/lib BINDIR=/sbin install</command></userinput></screen>
100
101</sect2>
102
103<sect2>
104<title>Command explanations</title>
105
106<para><parameter>PREFIX=/usr LIBDIR=/lib BINDIR=/sbin</parameter>: Compiles
107and installs <application>iptables</application> libraries into
108<filename class="directory">/lib</filename>, binaries into
109<filename class="directory">/sbin</filename> and the remainder into the
110<filename class="directory">/usr</filename> hierarchy instead of
111<filename class="directory">/usr/local</filename>. Firewalls are
112generally activated during the boot process and
113<filename class="directory">/usr</filename> may not be mounted at that
114time.</para>
115
116</sect2>
117
118<sect2>
119<title>Contents</title>
120
121<segmentedlist>
122<segtitle>Installed Programs</segtitle>
123<segtitle>Installed Libraries</segtitle>
124<segtitle>Installed Directory</segtitle>
125
126<seglistitem>
127<seg>iptables, iptables-restore, iptables-save and ip6tables</seg>
128<seg>libip6t_*.so and libipt_*.so</seg>
129<seg>/lib/iptables</seg>
130</seglistitem>
131</segmentedlist>
132
133<variablelist>
134<bridgehead renderas="sect3">Short Descriptions</bridgehead>
135<?dbfo list-presentation="list"?>
136
137<varlistentry id="iptables-prog">
138<term><command>iptables</command></term>
139<listitem><para>is used to set up, maintain, and inspect the tables of
140<acronym>IP</acronym> packet filter rules in the Linux kernel.</para>
141<indexterm zone="iptables iptables-prog">
142<primary sortas="b-iptables">iptables</primary>
143</indexterm></listitem>
144</varlistentry>
145
146<varlistentry id="iptables-restore">
147<term><command>iptables-restore</command></term>
148<listitem><para>is used to restore <acronym>IP</acronym> Tables from data
149specified on <acronym>STDIN</acronym>. Use I/O redirection provided by your
150shell to read from a file.</para>
151<indexterm zone="iptables iptables-restore">
152<primary sortas="b-iptables-restore">iptables-restore</primary>
153</indexterm></listitem>
154</varlistentry>
155
156<varlistentry id="iptables-save">
157<term><command>iptables-save</command></term>
158<listitem><para>is used to dump the contents of an <acronym>IP</acronym> Table
159in easily parseable format to <acronym>STDOUT</acronym>. Use I/O-redirection
160provided by your shell to write to a file.</para>
161<indexterm zone="iptables iptables-save">
162<primary sortas="b-iptables-save">iptables-save</primary>
163</indexterm></listitem>
164</varlistentry>
165
166<varlistentry id="ip6tables">
167<term><command>ip6tables</command></term>
168<listitem><para>is used to set up, maintain, and inspect the tables of
169<acronym>IP</acronym>v6 packet filter rules in the Linux kernel. Several
170different tables may be defined. Each table contains a number of built-in
171chains and may also contain user-defined chains.</para>
172<indexterm zone="iptables ip6tables">
173<primary sortas="b-ip6tables">ip6tables</primary>
174</indexterm></listitem>
175</varlistentry>
176
177<varlistentry id="libip-iptables">
178<term><filename class='libraryfile'>libip*.so</filename></term>
179<listitem><para>library modules are various modules (implemented as dynamic
180libraries) which extend the core functionality of
181<command>iptables</command>.</para>
182<indexterm zone="iptables libip-iptables">
183<primary sortas="c-libip-iptables">libip*.so</primary>
184</indexterm></listitem>
185</varlistentry>
186</variablelist>
187
188</sect2>
189
190</sect1>
Note: See TracBrowser for help on using the repository browser.