Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Alistair Tonner <Alistair@nerdnet.ca>
To: netfilter@lists.netfilter.org
Subject: iptables startup/initialization
Date: Fri, 29 Apr 2005 09:03:54 -0400	[thread overview]
Message-ID: <200504290903.54971.Alistair@nerdnet.ca> (raw)
In-Reply-To: <9927912d050429005922ecbd8d@mail.gmail.com>

On April 29, 2005 03:59 am, Visham Ramsurrun wrote:
> Hi to all,
>
	Greetings: and first lesson, always rewrite the subject when using the digest 
to reply to the list -- PLEASE!! (it gets you more attention and better 
responses)

> I wanted to know what we actually need to start iptables service on a
> PC. Do we have to write start or initialisation scripts?

Umm ... no its part of the kernel.  However if you want it to actually do 
something useful you need startup and shutdown scripts or a flat load file.

My personal preference, and is available on many distributions is to manually 
build the firewall baseline, using iptables -A and iptables -I etc, then use 
iptables-save to store the basics and then update as required.  Somewhere in 
your rc.* scripts there should be iptables-restore -c < {file_Name}.

	However, some distro's don't have startup and shutdown scripts.  Thus, 
suggesttions are to create a script that contains all the iptables commands 
to create your firewall, a la Oskar Andreasson's rc.firewall.txt script (see 
netfilter.org's website for a pointer to Oskar's howto, it is in my books the 
premier to understand iptables) and include a call to it somewhere in your 
rc.x scripts.  Good logic suggests that you get that loaded *before* your 
interfaces come up and connect.

	In my gentoo desktop, I've modified the /etc/init.d/iptables script to keep 8 
previous copies of my firewall  in /var/lib/iptables ... but then I'm 
completely crazy.

	Powerful suggestion is that you read Oskar's howto.  It sounds like you could 
use the info.


	Alistair Tonner

>
> If yes, can I can a sample of these scripts?
>
> Regards,
> Visham


      reply	other threads:[~2005-04-29 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4271a19b.662875ec.2288.402bSMTPIN_ADDED@mx.gmail.com>
2005-04-29  7:59 ` netfilter Digest, Vol 9, Issue 65 Visham Ramsurrun
2005-04-29 13:03   ` Alistair Tonner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200504290903.54971.Alistair@nerdnet.ca \
    --to=alistair@nerdnet.ca \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox