Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: new iptables user - default options
@ 2003-10-28 12:54 Knight, Steve
  2003-10-28 13:09 ` Ray Leach
  2003-10-28 13:13 ` Robert P. J. Day
  0 siblings, 2 replies; 9+ messages in thread
From: Knight, Steve @ 2003-10-28 12:54 UTC (permalink / raw)
  To: netfilter

Thanks Robert - I appreciate your response.

I have to say I'd agree - it seems to be more of a belt and braces approach
to use your suggestion, and more in the spirit of what we were told in
checkpoint kindergarten ["deny everything unless explicitly asked" - also
sounds a bit like being married].

Are the rules in each chain processed top down?

steve






-----Original Message-----
From: Robert P. J. Day [mailto:rpjday@mindspring.com] 
Sent: 28 October 2003 12.34
To: Knight, Steve
Cc: netfilter@lists.netfilter.org
Subject: Re: new iptables user - default options


On Tue, 28 Oct 2003, Knight, Steve wrote:

> Hi there
> 
> Rh9 has installed all the default filter policies as "accept" and then
> forwards all packets from INPUT and FORWARD to a Lokkit chain.
> 
> Is this normal?  It seems to me [as a iptables n00b, although I am
> checkpoint certified] to be ok, as eventually the traffic is hitting the
> detailed lokkit chain, but is this the default install options that
everyone
> gets?

it seems that it's just a philosophical difference.  you can set the
DENY policy, then explicitly accept only what you want, or as RH did,
accept everything only to pass it all to a user-defined chain that
effectively does the same thing.

personally, i'd rather see a DENY policy so that, if i somehow messed
up some of my rules, i'm more likely to be *more* restrictive than
less restrictive.  but RH's approach seems no worse, just different.

rday



.


-----------------------------------------------------------------------
Information in this email may be privileged, confidential and is 
intended exclusively for the addressee.  The views expressed may
not be official policy, but the personal views of the originator.
If you have received it in error, please notify the sender by return
e-mail and delete it from your system.  You should not reproduce, 
distribute, store, retransmit, use or disclose its contents to anyone.
 
Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.
-----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: new iptables user - default options
@ 2003-10-28 16:39 Knight, Steve
  2003-10-28 18:17 ` Rob Sterenborg
  0 siblings, 1 reply; 9+ messages in thread
From: Knight, Steve @ 2003-10-28 16:39 UTC (permalink / raw)
  To: netfilter

Thanks to both Rob S and Rob D

In other words putting "accept from anywhere -m --state ESTABLISHED,RELATED"
on each of the default chains allows any traffic that's related to an
existing permitted connection.  Should that be at the top [first rule match
wins?] of each table?



-----Original Message-----

From: Robert P. J. Day [mailto:rpjday@mindspring.com] 
Sent: 28 October 2003 4.22
To: Knight, Steve
Cc: netfilter@lists.netfilter.org
Subject: RE: new iptables user - default options


On Tue, 28 Oct 2003, Knight, Steve wrote:

> I get the picture - so you can have "external-SSHD-access" chain, and
> "external-SMTP-access" chain, rather than a huge pile of rules which you
> could risk blamming, in a rushed moment.
> 
> I have mr Ziegler's esteemed tome [it seemed to be v highly regarded after
a
> snoop around googly groups] and it's damn fine, it's what I'm working from
> to configure my fw.  Its so rigorous though that I can get easily lost in
> there!
> 
> Sorry for the ultra-lamer question now...
> 
> is it the case that for each rule on the INPUT chain you must have the
> corresponding OUTPUT rule also?  i.e. if I say
> 
> <pseudocode>
> Accept from ANYWHERE spt:1024...65535 LOCALHOST dpt:22
> </pseudocode>
> 
> Do I also have to put a corresponding response rule in --- 
> 
> Accept from LOCALHOST spt:22 ANYWHERE dpt:1024...65535
> 
> In order to allow the response through?
> OR does the fact I've put an "accept from anywhere to SSHD" rule, imply
that
> I want to allow the service to respond.
> 
> Again, sorry for what seems like an ultra stupid question, but it's not
100%
> clearly stated in ziegler, at least after two reads of the relevant
chapter.

what you want in ziegler is in the middle of p. 120 -- the rules to
allow all incoming and outgoing traffic that's RELATED,ESTABLISHED.
what those rules do is allow all traffic in either direction that's
*related* to an existing connection.  so you just need to set up
your rules to allow/deny the *initial* request, and those two rules
will automatically use connection tracking to allow subsequent traffic
that's related to that original request.

rday



.


-----------------------------------------------------------------------
Information in this email may be privileged, confidential and is 
intended exclusively for the addressee.  The views expressed may
not be official policy, but the personal views of the originator.
If you have received it in error, please notify the sender by return
e-mail and delete it from your system.  You should not reproduce, 
distribute, store, retransmit, use or disclose its contents to anyone.
 
Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.
-----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: new iptables user - default options
@ 2003-10-28 16:08 Knight, Steve
  2003-10-28 16:21 ` Robert P. J. Day
  0 siblings, 1 reply; 9+ messages in thread
From: Knight, Steve @ 2003-10-28 16:08 UTC (permalink / raw)
  To: netfilter

I get the picture - so you can have "external-SSHD-access" chain, and
"external-SMTP-access" chain, rather than a huge pile of rules which you
could risk blamming, in a rushed moment.

I have mr Ziegler's esteemed tome [it seemed to be v highly regarded after a
snoop around googly groups] and it's damn fine, it's what I'm working from
to configure my fw.  Its so rigorous though that I can get easily lost in
there!

Sorry for the ultra-lamer question now...

is it the case that for each rule on the INPUT chain you must have the
corresponding OUTPUT rule also?  i.e. if I say

<pseudocode>
Accept from ANYWHERE spt:1024...65535 LOCALHOST dpt:22
</pseudocode>

Do I also have to put a corresponding response rule in --- 

Accept from LOCALHOST spt:22 ANYWHERE dpt:1024...65535

In order to allow the response through?
OR does the fact I've put an "accept from anywhere to SSHD" rule, imply that
I want to allow the service to respond.

Again, sorry for what seems like an ultra stupid question, but it's not 100%
clearly stated in ziegler, at least after two reads of the relevant chapter.

Thanks :D

steve




-----Original Message-----
From: Robert P. J. Day [mailto:rpjday@mindspring.com] 
Sent: 28 October 2003 1.14
To: Knight, Steve
Cc: netfilter@lists.netfilter.org
Subject: RE: new iptables user - default options


On Tue, 28 Oct 2003, Knight, Steve wrote:

> Thanks Robert - I appreciate your response.
> 
> I have to say I'd agree - it seems to be more of a belt and braces
approach
> to use your suggestion, and more in the spirit of what we were told in
> checkpoint kindergarten ["deny everything unless explicitly asked" - also
> sounds a bit like being married].
> 
> Are the rules in each chain processed top down?

yup, which is why many folks recommend setting up some user-defined
chains to break the processing down into more efficient and bite-sized
pieces (unless you have a very small set of rules, then it's not
really worth it).

so far, the more comprehensive treatment of iptables i've seen is
ziegler's new riders book, particularly the lengthy examples of 
rulesets he supplies.

rday



.


-----------------------------------------------------------------------
Information in this email may be privileged, confidential and is 
intended exclusively for the addressee.  The views expressed may
not be official policy, but the personal views of the originator.
If you have received it in error, please notify the sender by return
e-mail and delete it from your system.  You should not reproduce, 
distribute, store, retransmit, use or disclose its contents to anyone.
 
Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.
-----------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 9+ messages in thread
* new iptables user - default options
@ 2003-10-28 12:12 Knight, Steve
  2003-10-28 12:34 ` Robert P. J. Day
  0 siblings, 1 reply; 9+ messages in thread
From: Knight, Steve @ 2003-10-28 12:12 UTC (permalink / raw)
  To: netfilter

Hi there

Rh9 has installed all the default filter policies as "accept" and then
forwards all packets from INPUT and FORWARD to a Lokkit chain.

Is this normal?  It seems to me [as a iptables n00b, although I am
checkpoint certified] to be ok, as eventually the traffic is hitting the
detailed lokkit chain, but is this the default install options that everyone
gets?

Cheers

Steve


-----------------------------------------------------------------------
Information in this email may be privileged, confidential and is 
intended exclusively for the addressee.  The views expressed may
not be official policy, but the personal views of the originator.
If you have received it in error, please notify the sender by return
e-mail and delete it from your system.  You should not reproduce, 
distribute, store, retransmit, use or disclose its contents to anyone.
 
Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.
-----------------------------------------------------------------------



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

end of thread, other threads:[~2003-10-28 18:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-28 12:54 new iptables user - default options Knight, Steve
2003-10-28 13:09 ` Ray Leach
2003-10-28 13:13 ` Robert P. J. Day
  -- strict thread matches above, loose matches on Subject: below --
2003-10-28 16:39 Knight, Steve
2003-10-28 18:17 ` Rob Sterenborg
2003-10-28 16:08 Knight, Steve
2003-10-28 16:21 ` Robert P. J. Day
2003-10-28 12:12 Knight, Steve
2003-10-28 12:34 ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox