* Mark packets/Transfer data from iptables to QUEUE
@ 2010-05-23 19:22 Mistick Levi
2010-05-23 23:15 ` Ajay Lele
0 siblings, 1 reply; 2+ messages in thread
From: Mistick Levi @ 2010-05-23 19:22 UTC (permalink / raw)
To: netfilter
Hi,
I'm using libnetfilter_queue, and i would like to treat packets from
different rules differently, in the same queue.
Example:
rulematch: ipsrc: 123.132.123.232 ipdst = 1.2.3.4 udp port-12321 -J
NFQUEUE --queue-num 2 - "DANPACKET"
rulematch ipsrc: 123.132.123.232 ipdst = 1.2.3.4 udp port-12221 -J
NFQUEUE --queue-num 2 - "LaneyPacket"
And when this messages get to userspace application, i want to be able
to extract the comment and treat each packet by a different method...
Any idea's?
Kind regards
Levi Yechiel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Mark packets/Transfer data from iptables to QUEUE
2010-05-23 19:22 Mark packets/Transfer data from iptables to QUEUE Mistick Levi
@ 2010-05-23 23:15 ` Ajay Lele
0 siblings, 0 replies; 2+ messages in thread
From: Ajay Lele @ 2010-05-23 23:15 UTC (permalink / raw)
To: Mistick Levi; +Cc: netfilter
Hi Levi
On Sun, May 23, 2010 at 12:22 PM, Mistick Levi <gmistick@gmail.com> wrote:
> Hi,
> I'm using libnetfilter_queue, and i would like to treat packets from
> different rules differently, in the same queue.
> Example:
> rulematch: ipsrc: 123.132.123.232 ipdst = 1.2.3.4 udp port-12321 -J
> NFQUEUE --queue-num 2 - "DANPACKET"
> rulematch ipsrc: 123.132.123.232 ipdst = 1.2.3.4 udp port-12221 -J
> NFQUEUE --queue-num 2 - "LaneyPacket"
>
> And when this messages get to userspace application, i want to be able
> to extract the comment and treat each packet by a different method...
> Any idea's?
You can set a different mark on the packets belonging to each stream
using iptables -j MARK --set-mark, and then call different method in
userspace based on the value of mark on the received packet
Regards
Ajay
>
> Kind regards
> Levi Yechiel
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-23 23:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-23 19:22 Mark packets/Transfer data from iptables to QUEUE Mistick Levi
2010-05-23 23:15 ` Ajay Lele
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).