Skip to contentSkip to conversation

information

DISCUSSION Muhammad R. Sami 2 participants 6 messages Jul 2, 2004 – Jul 3, 2004 1 message not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I got the libipq/QUEUE part working but the problem is that it only works for the first time. For example, if I want to drop all icmp packets, it will, but if I change the nfmark from drop to accept and then recompile my libipq program, it does not work and the dropping policy is maintained. Same for the other way around.
Regards,

Muhammad R. Sami
Research Assistant,
Computer Engineering Department
P.O.Box 354
King Fahd University of Petroleum & Minerals
Dhahran 31261
Saudi Arabia.
Tel: +96638601423
Cell: +96657982951
www.ccse.kfupm.edu.sa/sami

-----Original Message-----
From: Babar Qaisrani [mailto:[email protected]]
Sent: Friday, July 02, 2004 6:03 PM
To: Muhammad R. Sami
Subject: RE: information

well
install the missing module !

most probably either ui have to recompile the Kernel or install module ....depending on ur Linux distro
im using Debian
I installed iptables-dev , my guess is
i think used the default kernel settings for 2.4.26

guess looking up guides in NETFILTER web site would be good start as well!

Regards
Babar Qaisrani

Quoting "Muhammad R. Sami" <[email protected]>:

Quoted 10 lines

-----Original Message-----
From: Babar Qaisrani [mailto:[email protected]]
Sent: Friday, July 02, 2004 5:23 PM
To: Muhammad R. Sami
Subject: RE: information

AOA
well u do that by following
/locationofiptables/iptables -A Queue Name(OUTPUT|INPUT|FORWARD) -p

protocol

Quoted 9 lines

name -j QUEUE
e.g
/usr/sbin/iptables -A OUTPUT -p ip -j QUEUE --------- I have done this

REMEMBER do this before --------------------here I am having problems (FATAL: module not found)
/sbin/modprobe iptable_filter
/sbin/modprobe ip_queue

Quoted 10 lines

hope it helps !

Regards
Babar Qaisrani

Quoting "Muhammad R. Sami" <[email protected]>:

Quoted 1 line

May I know exactly how you queue your packets to the userspace

application

Quoted 1 line
Quoted 1 line

as I also want to use libipq and QUEUE but am having problems. I mailed

my

Quoted 1 line
Quoted 1 line

case earlier to the list. I am simply following the example in the

manpage

Quoted 38 lines
Quoted 30 lines

of libipq. But it does not seem to work.
Regards,

Muhammad R. Sami
Research Assistant,
Computer Engineering Department
P.O.Box 354
King Fahd University of Petroleum & Minerals
Dhahran 31261
Saudi Arabia.
Tel: +96638601423
Cell: +96657982951
www.ccse.kfupm.edu.sa/sami
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Babar Qaisrani
Sent: Tuesday, June 29, 2004 10:06 PM
To: [email protected]
Subject: information

Hello All,

I am developing some code using Lib IPQ and User Space queuing . i have set the Server to put incoming packets in Queue .
The IP ID on the IP Header i get is used as a Referance Counter. My Question is : Is the IP ID in the IP Packet re numbered in IP Queue some how?
im sorry if this Question is answered before ..

Quoted 6 lines

Thanks
Babar

Quoted 4 lines

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

#2 lore raw
Quoted 5 lines · Muhammad R. Sami

I got the libipq/QUEUE part working but the problem is that it only works for the first time. For example, if I want to drop all icmp packets, it will, but if I change the nfmark from drop to accept and then recompile my libipq program, it does not work and the dropping policy is maintained. Same for the other way around.

Please explain what you refer to by "change the nfmark from drop to accept".

nfmark does not have a concept of drop/accept, just value.

Is you perhaps speaking about the verdict set by the userspace telling if the packet should be accepted (passed on to next hook) or dropped? This is just a verdict and not related to nfmark.

Regards
Henrik

#3 lore raw

Yes, I mean to say the verdict. Now I am a bit confused. Is not the verdict enough to tell the kernel what to do with the packets? If yes, then it does not work with me more than once.

Muhammad R. Sami
Research Assistant,
Computer Engineering Department
P.O.Box 354
King Fahd University of Petroleum & Minerals
Dhahran 31261
Saudi Arabia.
Tel: +96638601423
Cell: +96657982951
www.ccse.kfupm.edu.sa/sami

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Henrik Nordstrom
Sent: Saturday, July 03, 2004 4:08 AM
To: Muhammad R. Sami
Cc: 'Babar Qaisrani'; Netfilter List
Subject: RE: information

Quoted 4 lines · Muhammad R. Sami

I got the libipq/QUEUE part working but the problem is that it only works for the first time. For example, if I want to drop all icmp packets, it will, but if I change the nfmark from drop to accept and then recompile my libipq program, it does not work and the dropping policy is maintained.

Same

Quoted 1 line

for the other way around.

Please explain what you refer to by "change the nfmark from drop to accept".

nfmark does not have a concept of drop/accept, just value.

Is you perhaps speaking about the verdict set by the userspace telling if the packet should be accepted (passed on to next hook) or dropped? This is just a verdict and not related to nfmark.

Regards
Henrik

#4 lore raw
Quoted 3 lines · Muhammad R. Sami

Yes, I mean to say the verdict. Now I am a bit confused. Is not the verdict enough to tell the kernel what to do with the packets? If yes, then it does not work with me more than once.

The verdict tells what to do with the packet in this hook (PREROUTING/FORWARD/POSTROUTING etc). Only if the verdirct is NF_ACCEPT is the packet accepted by this hook.

Why it only works "once" for you I do not know. Maybe if you describe in full details what you mean by "once" we can find some hint to what is going wrong.

It is only that your talk about nfmark made me a little confused. nfmark is not related to the verdict. See the MARK target and/or linux advaced routing howto for more info on nfmark in case you want to learn more what the nfmark is and how it may be used. But it is not related to your problem.

Regards
Henrik

#5 lore raw

Thanks for your help, I simply want to QUEUE packets to the libipq application and then through verdict accept or drop them. Sorry for creating the confusion by using "nfmark" in my emails. Right now my work does not require nfmark at all.
Now what I mean by "once" is that whenever I queue a specific flow of packet to the libipq program and for example set the verdict to DROP, it works fine. But if I change the verdict to ACCEPT and recompile my program, the box still drops the packets. On the other hand if I ACCEPT the packets first, they will always be accepted even after changing the verdict to DROP. In short, whatever verdict I set the first time seems to be there always despite the fact that I change the verdict and recompile the program. Regards,

Muhammad R. Sami
Research Assistant,
Computer Engineering Department
P.O.Box 354
King Fahd University of Petroleum & Minerals
Dhahran 31261
Saudi Arabia.
Tel: +96638601423
Cell: +96657982951
www.ccse.kfupm.edu.sa/sami

-----Original Message-----
From: Henrik Nordstrom [mailto:[email protected]]
Sent: Saturday, July 03, 2004 11:57 AM
To: Muhammad R. Sami
Cc: 'Babar Qaisrani'; 'Netfilter List'
Subject: RE: information

Quoted 1 line · Muhammad R. Sami

Yes, I mean to say the verdict. Now I am a bit confused. Is not the

verdict

Quoted 1 line

enough to tell the kernel what to do with the packets? If yes, then it

does

Quoted 1 line

not work with me more than once.

The verdict tells what to do with the packet in this hook (PREROUTING/FORWARD/POSTROUTING etc). Only if the verdirct is NF_ACCEPT is the packet accepted by this hook.

Why it only works "once" for you I do not know. Maybe if you describe in full details what you mean by "once" we can find some hint to what is going wrong.

It is only that your talk about nfmark made me a little confused. nfmark is not related to the verdict. See the MARK target and/or linux advaced routing howto for more info on nfmark in case you want to learn more what the nfmark is and how it may be used. But it is not related to your problem.

Regards
Henrik

#6 lore raw
Quoted 4 lines · Muhammad R. Sami

Now what I mean by "once" is that whenever I queue a specific flow of packet to the libipq program and for example set the verdict to DROP, it works fine. But if I change the verdict to ACCEPT and recompile my program, the box still drops the packets.

Have you restarted your application?

Are you positively sure you restarted the recompiled binary?

Quoted 1 line

From where are you invoking the QUEUE target?

What does your ruleset (in iptables) look like?

Regards
Henrik