Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Marco Colombo <marco@esi.it>
To: netfilter@lists.netfilter.org
Subject: Re: Question about marking traffic.
Date: Tue, 29 Jun 2004 11:29:50 +0200	[thread overview]
Message-ID: <40E1368E.4040207@esi.it> (raw)
In-Reply-To: <200406282204.57874.Antony@Soft-Solutions.co.uk>

Antony Stone wrote:
> On Monday 28 June 2004 9:50 pm, mortar wrote:
> 
> 
>>I have one more question. Maybe someone can help.
>>
>>What about tracking connections on non standard ftp ports (or http), for
>>example 2121? How can i recognize them as a ftp (or http) connections
>>and proper mark them?
> 
> 
> I would answer this "you can recognise them just the same as you can recognise 
> them on 'standard' ports 21/20 or 80" - in other words (with a packet filter) 
> you can't - you just have to assume that ports = services (not always a safe 
> assumption).
> 
> 
>>I read about layer7-filter project, but is it necessery?
> 
> 
> Yes - if you want to know whether a traffic stream is HTTP (etc), you have to 
> look at OSI layer 7, because that's the only place HTTP means anything.
> 
> Netfilter works at OSI layers 3 & 4, therefore it can't identify what is HTTP 
> / FTP / DNS etc - it can only guess.

Not completely true, IMHO. conntrack modules look well above the TCP level
(OSI levels make little sense for the TCP/IP protocol suite, they simply
don't fit perfectly) otherwise they won't work. ip_conntrack_ftp does look
at the FTP protocol, and is able to recognise incoming (data) connections
as RELATED to the control one. But I don't know how to use such knowledge
to detect FTP running on non-stardard ports, particularly in matching a
rule.

.TM.
-- 
       ____/  ____/   /
      /      /       /			Marco Colombo
     ___/  ___  /   /		      Technical Manager
    /          /   /			 ESI s.r.l.
  _____/ _____/  _/		       Colombo@ESI.it


  reply	other threads:[~2004-06-29  9:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-28 16:17 Question about marking traffic mortar
2004-06-28 16:31 ` Antony Stone
2004-06-28 20:50   ` Re[2]: " mortar
2004-06-28 21:04     ` Antony Stone
2004-06-29  9:29       ` Marco Colombo [this message]
2004-06-30 20:09         ` Antony Stone

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=40E1368E.4040207@esi.it \
    --to=marco@esi.it \
    --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