source: postlfs/security/iptables.xml@ 48ecffe8

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

Added indexing tags to iptables

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

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