* conntrack/state with QUEUE target
@ 2009-11-27 15:05 Udo Schneider
2009-11-27 15:54 ` Udo Schneider
0 siblings, 1 reply; 3+ messages in thread
From: Udo Schneider @ 2009-11-27 15:05 UTC (permalink / raw)
To: netfilter
All,
I'm a little confused whether the combination of conntrack/state with
QUEUE targets is supported.
I have a usermode app which processes packets via libNFQ which works
fine. Up to know we had a very simple setup like
-t mangle -A FORWARD -p tcp --dport 80 -j QUEUE
-t mangle -A FORWARD -p tcp --sport 80 -j QUEUE
This worked fine. Now however we have the requirement for more granular
"stateful" Rules. I though it should be possible to combine
state/conntrack with the QUEUE target ... but this doesn't seem to work.
-t mangle -A FORWARD -p tcp --dport 80 -m state --state NEW,ESTABLISHED
-j QUEUE
However using this rule no (http) connection goes through.
Any pointers?
CU,
Udo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: conntrack/state with QUEUE target
2009-11-27 15:05 conntrack/state with QUEUE target Udo Schneider
@ 2009-11-27 15:54 ` Udo Schneider
0 siblings, 0 replies; 3+ messages in thread
From: Udo Schneider @ 2009-11-27 15:54 UTC (permalink / raw)
To: netfilter
All,
> This worked fine. Now however we have the requirement for more granular
> "stateful" Rules. I though it should be possible to combine
> state/conntrack with the QUEUE target ... but this doesn't seem to work.
>
> -t mangle -A FORWARD -p tcp --dport 80 -m state --state NEW,ESTABLISHED
> -j QUEUE
I think I got it.
-t mangle -A FORWARD -p tcp --dport 80 -m state --state NEW,ESTABLISHED
-j QUEUE
-t mangle -A FORWARD -p tcp --sport 80 -m state --state ESTABLISHED
-j QUEUE
This combination seems to work. Coming from a Check Point Background I
assumed that the statefulness provided by state/conntrack means that I
only have to specify the initiating connection - replies are
accepted/queued automagically based on connection data.
However I seem to be wrong - or did I completely miss the point?
CU,
Udo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: conntrack/state with QUEUE target
@ 2009-11-28 9:49 Mart Frauenlob
0 siblings, 0 replies; 3+ messages in thread
From: Mart Frauenlob @ 2009-11-28 9:49 UTC (permalink / raw)
To: netfilter
Udo Schneider wrote:
> All,
>
>> This worked fine. Now however we have the requirement for more
>> granular "stateful" Rules. I though it should be possible to combine
>> state/conntrack with the QUEUE target ... but this doesn't seem to work.
>>
>> -t mangle -A FORWARD -p tcp --dport 80 -m state --state
>> NEW,ESTABLISHED -j QUEUE
>
> I think I got it.
>
> -t mangle -A FORWARD -p tcp --dport 80 -m state --state
> NEW,ESTABLISHED -j QUEUE
> -t mangle -A FORWARD -p tcp --sport 80 -m state --state ESTABLISHED
> -j QUEUE
>
> This combination seems to work. Coming from a Check Point Background I
> assumed that the statefulness provided by state/conntrack means that I
> only have to specify the initiating connection - replies are
> accepted/queued automagically based on connection data.
>
> However I seem to be wrong - or did I completely miss the point?
>
Hello,
the connection tracking itself will never do anything with a packet,
than tracking it.
What is done with the state information, that is put onto the packet, is
totally up to the user.
NO automagic is done.
i.e. what if you don't want replies in your queue, etc...
Also take care about state 'INVALID' and 'UNTRACKED' packets, your queue
will not see them...
btw: NFQUEUE is the successor of QUEUE.
Regards
Mart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-28 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 15:05 conntrack/state with QUEUE target Udo Schneider
2009-11-27 15:54 ` Udo Schneider
-- strict thread matches above, loose matches on Subject: below --
2009-11-28 9:49 Mart Frauenlob
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).