All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables basic concepts
@ 2003-11-28 14:19 Alejandro Cabrera Obed
  2003-11-28 16:39 ` Rob Sterenborg
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Cabrera Obed @ 2003-11-28 14:19 UTC (permalink / raw)
  To: Netfilter lista (iptables)

Hi everybody !!!
I have seen a pair of iptables scripts in order to learn the technique and I
noted that there's no a unique order in the construction of the ruleset. I'm
new at this matter so I have to ask you this 2 short questions:

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)

Thanks a lot, byeeeee

Alejandro



^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: iptables basic concepts
  2003-11-28 14:19 iptables basic concepts Alejandro Cabrera Obed
@ 2003-11-28 16:39 ` Rob Sterenborg
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Sterenborg @ 2003-11-28 16:39 UTC (permalink / raw)
  To: 'Alejandro Cabrera Obed',
	'Netfilter lista (iptables)'

> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-28 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-28 14:19 iptables basic concepts Alejandro Cabrera Obed
2003-11-28 16:39 ` Rob Sterenborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.