netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Lim <vincent.lim@nestac.com>
To: Antony Stone <Antony@Soft-Solutions.co.uk>
Cc: netfilter@lists.netfilter.org
Subject: Re: ICMP conntrack
Date: Fri, 18 Oct 2002 18:07:11 +0800	[thread overview]
Message-ID: <3DAFDD4F.C24F44B6@nestac.com> (raw)
In-Reply-To: 200210180952.g9I9qEL27957@vulcan.rissington.net

Antony Stone wrote:
> 
> On Friday 18 October 2002 10:05 am, Cedric Blancher wrote:
> 
> > Le ven 18/10/2002 à 10:28, Antony Stone a écrit :
> > > > I was wondering why I'm not getting any conntrack entires for icmp
> > > > connections?
> > >
> > > There is no concept of a "connection" for ICMP.
> >
> > Yes it's true, but for some, you have a request/reply concept.
> 
> Yes, I realised that was the only exception after I posted my reply.
> 
> > > A single ICMP packet is sent to indicate some situation has occurred.
> > > There's no reply, there's no follow-up packet, therefore there's no need
> > > to keeptrack of a "connection" for something which consists of only a
> > > single packet.
> >
> > Two cases :
> >
> >       request/reply : echo, timestamp, address mask and info
> >               First packet (request) is NEW, others (replies) are
> >               ESTABLISHED ; entries have a 30s timeout.
> >               If a unsolicitated reply is received, then INVALID.
> 
> Indeed.
> 
> >       ICMP erros : ICMP payload is a quotation extracted from the IP
> >               packet that has generated the error. This quotation is
> >               used to identify the related session in conntrack table.
> >               If ICMP match an active entry, then it's RELATED. If
> >               not, it's INVALID.
> 
> Although I agree with what you've said here, it's not really relevant to the
> original poster's question, because in these cases you'll still never see an
> ICMP entry in the connection tracking table.   Because the ICMP packets are
> RELATED to the original connection, it's the original packet which you'll see
> in the conntrack table - the ICMP replies simply get through because of their
> relationship to the original packet.
> 
> > So, for ICMP requests, you have some kind of conntrack, based on ICMP
> > sequence number. For ICMP errors, conntrack tries to associate them to
> > an existing entry.
> 
> ICMP sequence number ???   What's that ?

Results of a ping to www.ncftpd.com :

64 bytes from ncftpd.com (209.197.102.38): icmp_seq=11055 ttl=44
time=311.029 msec
64 bytes from ncftpd.com (209.197.102.38): icmp_seq=11056 ttl=44
time=308.126 msec
64 bytes from ncftpd.com (209.197.102.38): icmp_seq=11057 ttl=44
time=308.430 msec
64 bytes from ncftpd.com (209.197.102.38): icmp_seq=11058 ttl=44
time=302.321 msec

And the entries in conntrack related to the above is:
icmp     1 29 src=192.168.1.229 dst=209.197.102.38 type=8 code=0
id=59475 src=209.197.102.38 dst=192.168.1.229 type=0 code=0 id=59475
use=1 

However if I try to ping a nearer host, there would be no entry in the
conntrack table at all.

-- 
Vincent Lim
Software Engineer
NESTAC Solution Sdn Bhd
vincent.lim@nestac.com | +(6012) 659-6609


  reply	other threads:[~2002-10-18 10:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-17 23:27 Rules not taking effect Tib
2002-10-17 23:35 ` Antony Stone
2002-10-18  0:32   ` Rules not taking effect - 2nd try Tib
2002-10-18  2:51     ` ICMP conntrack Vincent Lim
2002-10-18  8:28       ` Antony Stone
2002-10-18  9:05         ` Cedric Blancher
2002-10-18  9:52           ` Antony Stone
2002-10-18 10:07             ` Vincent Lim [this message]
2002-10-18 10:22               ` Antony Stone
2002-10-18 10:54             ` Cedric Blancher
2002-10-18  8:25     ` Rules not taking effect - 2nd try Antony Stone
2002-10-18  9:35       ` Tib

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=3DAFDD4F.C24F44B6@nestac.com \
    --to=vincent.lim@nestac.com \
    --cc=Antony@Soft-Solutions.co.uk \
    --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;
as well as URLs for NNTP newsgroup(s).