netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using conntrack to create new expectation entry
@ 2010-06-11  9:57 GLAUME Vincent
  2010-06-13 23:24 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: GLAUME Vincent @ 2010-06-11  9:57 UTC (permalink / raw)
  To: netfilter

Hi there,

I'm currently trying to figure out how the whole libnetfilter_conntrack 
works, and more precisely the expect part of the lib.
My aim is to be able to create new expectation entries with this lib in 
an application that would inspect packets (either coming from a 
pcap-based sniffer or from netfilter via the nfqueue mechanism) : thus 
I'd like to allow connections related to the inspected (and already 
allowed) connections.

My various tests make me think that to create such an expectation entry, 
a kernel module related to the master connection is required: am I right?
For instance, the "expect_create" app in the libnetfilter_conntrack 
"utils" subdirectory works fine, unless I modify the destination port of 
the master conntrack structure... then it's no longer related to the FTP 
conntrack mechanism...
Same thing happens when using the conntrack app. from the conntrack-tools.

So, I'd like to know how to do this the right way, without coding the 
whole inspection thing in a kernel module (if this is possible). Is 
there any generic tcp conntrack system that could help here?
As I'm not too sure to fully understand the whole mechanism of expected 
connection creation, any hint is welcome!
I hope this is not too confused... Thanks,

-- 
V.

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

* Re: Using conntrack to create new expectation entry
  2010-06-11  9:57 Using conntrack to create new expectation entry GLAUME Vincent
@ 2010-06-13 23:24 ` Pablo Neira Ayuso
  2010-06-14  8:15   ` GLAUME Vincent
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2010-06-13 23:24 UTC (permalink / raw)
  To: GLAUME Vincent; +Cc: netfilter

GLAUME Vincent wrote:
> Hi there,
> 
> I'm currently trying to figure out how the whole libnetfilter_conntrack
> works, and more precisely the expect part of the lib.
> My aim is to be able to create new expectation entries with this lib in
> an application that would inspect packets (either coming from a
> pcap-based sniffer or from netfilter via the nfqueue mechanism) : thus
> I'd like to allow connections related to the inspected (and already
> allowed) connections.
> 
> My various tests make me think that to create such an expectation entry,
> a kernel module related to the master connection is required: am I right?
> For instance, the "expect_create" app in the libnetfilter_conntrack
> "utils" subdirectory works fine, unless I modify the destination port of
> the master conntrack structure... then it's no longer related to the FTP
> conntrack mechanism...
> Same thing happens when using the conntrack app. from the conntrack-tools.
> 
> So, I'd like to know how to do this the right way, without coding the
> whole inspection thing in a kernel module (if this is possible). Is
> there any generic tcp conntrack system that could help here?
> As I'm not too sure to fully understand the whole mechanism of expected
> connection creation, any hint is welcome!
> I hope this is not too confused... Thanks,

IIRC, this requires a couple of patches for the kernel to fully support
conntrack helpers in user-space, which seems to be what you need. So
this is not support until the appropriate patches go into the kernel.

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

* Re: Using conntrack to create new expectation entry
  2010-06-13 23:24 ` Pablo Neira Ayuso
@ 2010-06-14  8:15   ` GLAUME Vincent
  0 siblings, 0 replies; 3+ messages in thread
From: GLAUME Vincent @ 2010-06-14  8:15 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter

Pablo Neira Ayuso a écrit :
> GLAUME Vincent wrote:
>   
>> Hi there,
>>
>> I'm currently trying to figure out how the whole libnetfilter_conntrack
>> works, and more precisely the expect part of the lib.
>> My aim is to be able to create new expectation entries with this lib in
>> an application that would inspect packets (either coming from a
>> pcap-based sniffer or from netfilter via the nfqueue mechanism) : thus
>> I'd like to allow connections related to the inspected (and already
>> allowed) connections.
>>
>> My various tests make me think that to create such an expectation entry,
>> a kernel module related to the master connection is required: am I right?
>> For instance, the "expect_create" app in the libnetfilter_conntrack
>> "utils" subdirectory works fine, unless I modify the destination port of
>> the master conntrack structure... then it's no longer related to the FTP
>> conntrack mechanism...
>> Same thing happens when using the conntrack app. from the conntrack-tools.
>>
>> So, I'd like to know how to do this the right way, without coding the
>> whole inspection thing in a kernel module (if this is possible). Is
>> there any generic tcp conntrack system that could help here?
>> As I'm not too sure to fully understand the whole mechanism of expected
>> connection creation, any hint is welcome!
>> I hope this is not too confused... Thanks,
>>     
>
> IIRC, this requires a couple of patches for the kernel to fully support
> conntrack helpers in user-space, which seems to be what you need. So
> this is not support until the appropriate patches go into the kernel.
>   

Thank you for this hint, I'm going to dig it...
I wish I could understand why/how it works pretty well with the FTP 
conntrack though!

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

end of thread, other threads:[~2010-06-14  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11  9:57 Using conntrack to create new expectation entry GLAUME Vincent
2010-06-13 23:24 ` Pablo Neira Ayuso
2010-06-14  8:15   ` GLAUME Vincent

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).