From: "Rob Sterenborg" <rob@sterenborg.info>
To: 'Alejandro Cabrera Obed' <sisdis@tournet.com.ar>,
"'Netfilter lista (iptables)'" <netfilter@lists.netfilter.org>
Subject: RE: iptables basic concepts
Date: Fri, 28 Nov 2003 17:39:16 +0100 [thread overview]
Message-ID: <20031128163917.F1E3F7888@sterenborg.info> (raw)
In-Reply-To: <000701c3b5ba$b42935d0$0200a8c0@ale>
> 1) What option is the best: at first I set the default
> policies in the chains and later I flush all the existing
> firewall rules or viceversa ???
>
> 2) Is it a good practice to start the iptables firewalling
> rules from the rc.local script or is it better from the
> /etc/init.d/iptables script ??? (I use RH 9 and I start
> iptables from rc.local)
I'd :
- stop kernel forwarding,
- set the default policy (to DROP),
- flush the chains (even if you think they're empty ; it won't hurt),
- create the rules I need,
- if needed, start kernel forwarding,
- let the script start from /etc/init.d/iptables, or whatever the script is
called.
The reason for the last step is that you want the iptables script started as
quick as possible, so that there is (virtually) no time to hack the machine
before the rules are loaded. Best would be to start the script first and
then start the network so that the network isn't up before the rules are
loaded.
If you start it from /etc/rc.d/rc.local the script is started at the very
end of the startup sequence and then the network is already started for some
time.
Gr,
Rob
prev parent reply other threads:[~2003-11-28 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-28 14:19 iptables basic concepts Alejandro Cabrera Obed
2003-11-28 16:39 ` Rob Sterenborg [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=20031128163917.F1E3F7888@sterenborg.info \
--to=rob@sterenborg.info \
--cc=netfilter@lists.netfilter.org \
--cc=sisdis@tournet.com.ar \
/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