* RELATED ICMP packets of type 3
@ 2005-02-11 14:57 Mikhail Zotov
2005-02-11 15:06 ` Jason Opperisano
2005-02-11 15:27 ` Cedric Blancher
0 siblings, 2 replies; 12+ messages in thread
From: Mikhail Zotov @ 2005-02-11 14:57 UTC (permalink / raw)
To: netfilter
Hello everybody,
I have written an iptables script to protect a machine/LAN
and I'd like to clarify an issue about RELATED ICMP packets
of type 3 (actually, mostly 3/1).
As far as I understand, it is safe to ACCEPT incoming
packets of this sort.
Is it safe to allow _outgoing_ packets of this kind?
Can an attacker make my machine generate such packets
in order to obtain information about it? (All new
incoming packets are just DROPped.)
TIA,
Mikhail
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 14:57 RELATED ICMP packets of type 3 Mikhail Zotov
@ 2005-02-11 15:06 ` Jason Opperisano
2005-02-11 15:34 ` [OBORONA-SPAM] " Mikhail Zotov
2005-02-11 15:41 ` Victor Julien
2005-02-11 15:27 ` Cedric Blancher
1 sibling, 2 replies; 12+ messages in thread
From: Jason Opperisano @ 2005-02-11 15:06 UTC (permalink / raw)
To: netfilter
On Fri, Feb 11, 2005 at 05:57:16PM +0300, Mikhail Zotov wrote:
> Hello everybody,
>
> I have written an iptables script to protect a machine/LAN
> and I'd like to clarify an issue about RELATED ICMP packets
> of type 3 (actually, mostly 3/1).
>
> As far as I understand, it is safe to ACCEPT incoming
> packets of this sort.
yes. personally (for whatever that is worth), i allow ICMP Types 3, 11,
and 12 [*].
> Is it safe to allow _outgoing_ packets of this kind?
> Can an attacker make my machine generate such packets
> in order to obtain information about it? (All new
> incoming packets are just DROPped.)
yes. an open plea to all firewall administrators:
please stop breaking our Internet!!!
-j
* http://www.iana.org/assignments/icmp-parameters
--
"You couldn't fool your mother on the foolingest day of your life if
you had an electrified fooling machine."
--The Simpsons
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 14:57 RELATED ICMP packets of type 3 Mikhail Zotov
2005-02-11 15:06 ` Jason Opperisano
@ 2005-02-11 15:27 ` Cedric Blancher
2005-02-11 15:44 ` Mikhail Zotov
1 sibling, 1 reply; 12+ messages in thread
From: Cedric Blancher @ 2005-02-11 15:27 UTC (permalink / raw)
To: Mikhail Zotov; +Cc: netfilter
Le vendredi 11 février 2005 à 17:57 +0300, Mikhail Zotov a écrit :
> As far as I understand, it is safe to ACCEPT incoming
> packets of this sort.
As far as they're RELATED, you can assume theses packets to be
legitimate ones. So, yes it is safe to accept them. It is also necessary
to accept them if you want your IP stack to detect errors and be
functionnal. As an example, if you drop Fragmentation Needed packets
(type 3, code 4), you'll break PMTU Discovery...
> Is it safe to allow _outgoing_ packets of this kind?
For the same reason, yes, and for the sake of the Internet, do it. I'm
personnaly sick of theses dummy firewalls/admin who can't get ICMP
filtered correctly and break things, so you have to find workarounds all
the time. As an example, see why you have to adjust TCPMSS on PPPoE DSL
lines...
> Can an attacker make my machine generate such packets
> in order to obtain information about it? (All new
> incoming packets are just DROPped.)
If NEW packets are droped, then IP packets are not evaluated, then you
most certainly won't have ICMP errors sent back...
Netfilter gives you a mecanism to identify legitimate ICMP errors using
conntrack. If you trust Netfilter conntrack, use it.
--
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [OBORONA-SPAM] Re: RELATED ICMP packets of type 3
2005-02-11 15:06 ` Jason Opperisano
@ 2005-02-11 15:34 ` Mikhail Zotov
2005-02-11 15:41 ` Victor Julien
1 sibling, 0 replies; 12+ messages in thread
From: Mikhail Zotov @ 2005-02-11 15:34 UTC (permalink / raw)
To: netfilter
On Friday 11 February 2005 18:06, Jason Opperisano wrote:
> On Fri, Feb 11, 2005 at 05:57:16PM +0300, Mikhail Zotov wrote:
> > Hello everybody,
> >
> > I have written an iptables script to protect a machine/LAN
> > and I'd like to clarify an issue about RELATED ICMP packets
> > of type 3 (actually, mostly 3/1).
> >
> > As far as I understand, it is safe to ACCEPT incoming
> > packets of this sort.
>
> yes. personally (for whatever that is worth), i allow ICMP Types 3, 11,
> and 12 [*].
Thank you for the reply!
I do ACCEPT ICMP packets of types 11 and 12, too.
> > Is it safe to allow _outgoing_ packets of this kind?
> > Can an attacker make my machine generate such packets
> > in order to obtain information about it? (All new
> > incoming packets are just DROPped.)
>
> yes.
Does "yes" correspond to "Is it safe...?" or to "Can an attacker..."?
Regards,
Mikhail
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 15:06 ` Jason Opperisano
2005-02-11 15:34 ` [OBORONA-SPAM] " Mikhail Zotov
@ 2005-02-11 15:41 ` Victor Julien
2005-02-11 15:49 ` Jason Opperisano
1 sibling, 1 reply; 12+ messages in thread
From: Victor Julien @ 2005-02-11 15:41 UTC (permalink / raw)
To: netfilter
> yes. personally (for whatever that is worth), i allow ICMP Types 3, 11,
> and 12 [*].
Will these all be accepted by the accepting all RELATED packets? Or do i need
extra rules to allow them?
Regards,
Victor
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 15:27 ` Cedric Blancher
@ 2005-02-11 15:44 ` Mikhail Zotov
2005-02-11 15:58 ` Cedric Blancher
0 siblings, 1 reply; 12+ messages in thread
From: Mikhail Zotov @ 2005-02-11 15:44 UTC (permalink / raw)
To: netfilter
On Friday 11 February 2005 18:27, Cedric Blancher wrote:
> Le vendredi 11 février 2005 à 17:57 +0300, Mikhail Zotov a écrit :
> > As far as I understand, it is safe to ACCEPT incoming
> > packets of this sort.
>
> As far as they're RELATED, you can assume theses packets to be
> legitimate ones. So, yes it is safe to accept them. It is also necessary
> to accept them if you want your IP stack to detect errors and be
> functionnal. As an example, if you drop Fragmentation Needed packets
> (type 3, code 4), you'll break PMTU Discovery...
>
> > Is it safe to allow _outgoing_ packets of this kind?
>
> For the same reason, yes, and for the sake of the Internet, do it.
Thanks a lot for your comprehensive answer!
Thus, do I understand it correctly that I should and can safely
accept _all_ RELATED ICMP messages, both incoming and outgoing?
> I'm personnaly sick of theses dummy firewalls/admin who can't get ICMP
> filtered correctly and break things, so you have to find workarounds all
> the time.
I get your point. Unfortunately, I have failed to find a clear explanation
of proper dealing with ICMP packets. This mailing list was my last hope. :-)
Regards,
Mikhail
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 15:41 ` Victor Julien
@ 2005-02-11 15:49 ` Jason Opperisano
2005-02-11 16:02 ` Cedric Blancher
0 siblings, 1 reply; 12+ messages in thread
From: Jason Opperisano @ 2005-02-11 15:49 UTC (permalink / raw)
To: netfilter
On Fri, Feb 11, 2005 at 04:41:19PM +0100, Victor Julien wrote:
> > yes. personally (for whatever that is worth), i allow ICMP Types 3, 11,
> > and 12 [*].
>
> Will these all be accepted by the accepting all RELATED packets? Or do i need
> extra rules to allow them?
in theory--they are RELATED. in practice, i allow them explicitly.
looking at one of my firewalls, it appears as though there are ICMP Type
3 packets that get past the RELATED rule and hit the explicit allow rule,
but the counters for the explicit allow for types 11 and 12 are at 0.
-j
--
"Me lose brain? Uh, oh! Ha ha ha! Why I laugh?"
--The Simpsons
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 16:02 ` Cedric Blancher
@ 2005-02-11 15:58 ` Jason Opperisano
2005-02-11 16:08 ` Victor Julien
1 sibling, 0 replies; 12+ messages in thread
From: Jason Opperisano @ 2005-02-11 15:58 UTC (permalink / raw)
To: netfilter
On Fri, Feb 11, 2005 at 05:02:09PM +0100, Cedric Blancher wrote:
> Le vendredi 11 février 2005 à 10:49 -0500, Jason Opperisano a écrit :
> > in theory--they are RELATED. in practice, i allow them explicitly.
> > looking at one of my firewalls, it appears as though there are ICMP Type
> > 3 packets that get past the RELATED rule and hit the explicit allow rule,
>
> Did you have a look at one of them, just to see if it's a legitimate
> one ? I have experienced some troubles with DNS and port unreachable on
> very slow links, but that was quite unusual.
nah--i don't log them. truthfully, they probably aren't legitimate...but
i'm not terrified of ICMP enough to really be concerned about it.
i'd rather err on the side of allowing too much ICMP than not enough.
-j
--
"Alright brain, you don't like me and I don't like you. But let's just
get through this and then I can get back to killing you with beer."
--The Simpsons
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 15:44 ` Mikhail Zotov
@ 2005-02-11 15:58 ` Cedric Blancher
0 siblings, 0 replies; 12+ messages in thread
From: Cedric Blancher @ 2005-02-11 15:58 UTC (permalink / raw)
To: Mikhail Zotov; +Cc: netfilter
Le vendredi 11 février 2005 à 18:44 +0300, Mikhail Zotov a écrit :
> Thus, do I understand it correctly that I should and can safely
> accept _all_ RELATED ICMP messages, both incoming and outgoing?
As far as you consider Netfilter conntrack safe, yes.
--
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 15:49 ` Jason Opperisano
@ 2005-02-11 16:02 ` Cedric Blancher
2005-02-11 15:58 ` Jason Opperisano
2005-02-11 16:08 ` Victor Julien
0 siblings, 2 replies; 12+ messages in thread
From: Cedric Blancher @ 2005-02-11 16:02 UTC (permalink / raw)
To: Jason Opperisano; +Cc: netfilter
Le vendredi 11 février 2005 à 10:49 -0500, Jason Opperisano a écrit :
> in theory--they are RELATED. in practice, i allow them explicitly.
> looking at one of my firewalls, it appears as though there are ICMP Type
> 3 packets that get past the RELATED rule and hit the explicit allow rule,
Did you have a look at one of them, just to see if it's a legitimate
one ? I have experienced some troubles with DNS and port unreachable on
very slow links, but that was quite unusual.
--
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 16:02 ` Cedric Blancher
2005-02-11 15:58 ` Jason Opperisano
@ 2005-02-11 16:08 ` Victor Julien
2005-02-11 16:21 ` Cedric Blancher
1 sibling, 1 reply; 12+ messages in thread
From: Victor Julien @ 2005-02-11 16:08 UTC (permalink / raw)
To: netfilter
On Friday 11 February 2005 17:02, Cedric Blancher wrote:
> Le vendredi 11 février 2005 à 10:49 -0500, Jason Opperisano a écrit :
> > in theory--they are RELATED. in practice, i allow them explicitly.
> > looking at one of my firewalls, it appears as though there are ICMP Type
> > 3 packets that get past the RELATED rule and hit the explicit allow rule,
>
> Did you have a look at one of them, just to see if it's a legitimate
> one ? I have experienced some troubles with DNS and port unreachable on
> very slow links, but that was quite unusual.
So Cedric, you are basicly saying that if i accept RELATED icmp packets i
_should_ be a good internet-citizen?
Regards,
Victor
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: RELATED ICMP packets of type 3
2005-02-11 16:08 ` Victor Julien
@ 2005-02-11 16:21 ` Cedric Blancher
0 siblings, 0 replies; 12+ messages in thread
From: Cedric Blancher @ 2005-02-11 16:21 UTC (permalink / raw)
To: Victor Julien; +Cc: netfilter
Le vendredi 11 février 2005 à 17:08 +0100, Victor Julien a écrit :
> So Cedric, you are basicly saying that if i accept RELATED icmp packets i
> _should_ be a good internet-citizen?
I wouldn't say that this way. Imho good internet-citizen should accept
RELATED ICMP packets.
I say droping legitimate ICMP errors is harmful. Netfilter provides a
way to spot theses packets an accept them, so you can behave as a good
Internet citizen not breaking other people stuff (breaking yours is your
deal) ;)
--
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-02-11 16:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-11 14:57 RELATED ICMP packets of type 3 Mikhail Zotov
2005-02-11 15:06 ` Jason Opperisano
2005-02-11 15:34 ` [OBORONA-SPAM] " Mikhail Zotov
2005-02-11 15:41 ` Victor Julien
2005-02-11 15:49 ` Jason Opperisano
2005-02-11 16:02 ` Cedric Blancher
2005-02-11 15:58 ` Jason Opperisano
2005-02-11 16:08 ` Victor Julien
2005-02-11 16:21 ` Cedric Blancher
2005-02-11 15:27 ` Cedric Blancher
2005-02-11 15:44 ` Mikhail Zotov
2005-02-11 15:58 ` Cedric Blancher
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.