• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Iptables Tutorial 1.1.9
Oskar Andreasson
blueflux@koffein.net
 
Iptables Tutorial 1.1.9
by Oskar AndreassonCopyright © 2001 by Oskar Andreasson
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License,Version 1.1; with the Invariant Sections being "Introduction" and all sub-sections, with the Front-Cover Texts being "Original Author:Oskar Andreasson", and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU FreeDocumentation License".All scripts in this tutorial are covered by the GNU General Public License. The scripts are free source; you can redistribute themand/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 ofthe License.These scripts are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warrantyof MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License within this tutorial, under the section entitled "GNU GeneralPublic License"; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
Table of Contents
1. Introduction...........................................................................................................................1
Why this document was written..........................................................................................1How it was written...............................................................................................................1About the author.................................................................................................................1Dedications.........................................................................................................................1
2. Preparations..........................................................................................................................3
Where to get iptables..........................................................................................................3Kernel setup .......................................................................................................................321...............................................................................................................................5userland setup....................................................................................................................6Compiling the userland applications..........................................................................6Installation on Red Hat 7.1.........................................................................................8
3. How a rule is built................................................................................................................11
Basics...............................................................................................................................11Tables ...............................................................................................................................11Commands.......................................................................................................................12Matches............................................................................................................................16Generic matches......................................................................................................16Implicit matches.......................................................................................................18TCP matches...................................................................................................19UDP matches..................................................................................................20ICMP matches.................................................................................................22Explicit matches.......................................................................................................23MAC match......................................................................................................23Limit match......................................................................................................23Multiport match................................................................................................24Mark match .....................................................................................................25Owner match...................................................................................................26State match.....................................................................................................27Unclean match ................................................................................................28TOS match......................................................................................................28TTL match.......................................................................................................29Targets/Jumps ..................................................................................................................30ACCEPT target........................................................................................................31DROP target ............................................................................................................31QUEUE target..........................................................................................................31RETURN target........................................................................................................31LOG target...............................................................................................................32MARK target ............................................................................................................33REJECT target.........................................................................................................34TOS target................................................................................................................35MIRROR target........................................................................................................36SNAT target..............................................................................................................37DNAT target .............................................................................................................38MASQUERADE target.............................................................................................39
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...