old-www/LDP/solrhe/Securing-Optimizing-Linux-R.../fwall-scripts.html

187 lines
3.2 KiB
HTML

<HTML
><HEAD
><TITLE
>The firewall scripts files</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
REL="HOME"
TITLE="Securing and Optimizing Linux"
HREF="index.html"><LINK
REL="UP"
TITLE="Networking -Management, Firewall, Masquerading and Forwarding"
HREF="net-manage.html"><LINK
REL="PREVIOUS"
TITLE="Source Address Filtering"
HREF="chap10sec101.html"><LINK
REL="NEXT"
TITLE="
Config /etc/rc.d/init.d/firewall script file -Web Server"
HREF="chap11sec102.html"></HEAD
><BODY
CLASS="chapter"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Securing and Optimizing Linux: RedHat Edition -A Hands on Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="chap10sec101.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="chap11sec102.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="prt3chp4fscf"
>Chapter 11. The firewall scripts files</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>11.1. <A
HREF="chap11sec102.html"
>Config <TT
CLASS="filename"
>/etc/rc.d/init.d/firewall</TT
> script file -Web Server</A
></DT
><DT
>11.2. <A
HREF="chap11sec103.html"
>Config <TT
CLASS="filename"
>/etc/rc.d/init.d/firewall</TT
> script file - Mail Server</A
></DT
></DL
></DIV
><DIV
CLASS="highlights"
><A
NAME="AEN6602"
></A
><P
>&#13; The tool <TT
CLASS="literal"
>ipchains</TT
> allows you to set up firewalls, IP masquerading, etc. <TT
CLASS="literal"
>Ipchains</TT
> talks to the kernel and tells it what packets to filter. Therefore all your firewall setups are stored in the kernel, and thus
will be lost on reboot. To avoid this, we recommend using the System <TT
CLASS="literal"
>V</TT
> init scripts to make your rules permanent. To do this, create a firewall script file like shown over the next three sections in your
<TT
CLASS="filename"
>/etc/rc.d/init.d/</TT
> directory for each servers you have. Of course, each server has different services to offer and needs a different firewall setup. For this reason, we
provide you three different firewall settings, which you can play with, and examine to fit your needs. Also I assume that you have a minimum knowledge on how filtering firewalls and firewall rules works.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="chap10sec101.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="chap11sec102.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Source Address Filtering</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="net-manage.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Config <TT
CLASS="filename"
>/etc/rc.d/init.d/firewall</TT
> script file -Web Server</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>