Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Taylor Grant <gtaylor@riverviewtech.net>
To: christopher.f.ulherr@exgate.tek.com
Cc: netfilter@lists.netfilter.org
Subject: Re: logging of successful tcp connections
Date: Thu, 21 Apr 2005 18:55:01 -0500	[thread overview]
Message-ID: <42683D55.1060305@riverviewtech.net> (raw)
In-Reply-To: <F97948CF897D7B46802A18845A8B9BFD471BB9@us-rich-m01.global.tektronix.net>

> Hrmm... I've looked over the recent patch, but I'm not certain how to
> implement this 'and' logic "if it's in list A, but not in list B".. etc.

If you wanted to see if a packet was transitioning from NEW to ESTABLISHED I think it would be as simple as something like the following:

iptables -t filter -A FORWARD -i $INet -o $LAN -d $INet_IP -m recent --rcheck --name recent_NEW -m recent ! --rcheck --name recent_ESTABLISHED -j Transition_to_ESTABLISHED

I'm not sure about the placement of the "!" on the line, you might have to play with it a bit to make sure that the syntax is correct.  Anyone have any input here?

> There must be some place in the connection tracking code where a simple
> log can be placed. I'm not that familiar with the internals, but it
> would seem that just before updating the state, you could just printk a
> log. Am I way off here?

I'm sure there is a place in the kernel code that this could be put, though I don't know as if many people would want such a thing.  It might be able to be there and something that is off by default and then turned on via /proc.



Grant. . . .


  reply	other threads:[~2005-04-21 23:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21 22:28 logging of successful tcp connections christopher.f.ulherr
2005-04-21 23:55 ` Taylor Grant [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-21 17:28 christopher.f.ulherr
2005-04-21 19:58 ` Taylor, Grant
2005-04-21 16:38 christopher.f.ulherr
2005-04-22 15:14 ` Eric Leblond

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=42683D55.1060305@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=christopher.f.ulherr@exgate.tek.com \
    --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