From: varun <varun@rocsys.com>
To: netfilter-devel@lists.netfilter.org
Subject: Netfilter reg problem
Date: Fri, 09 Jun 2006 18:05:05 +0530 [thread overview]
Message-ID: <44896AF9.1020606@rocsys.com> (raw)
Hi all,
I have a module which basically registers to the netfilter
like shown below.
static struct nf_hook_ops my_preroute_ops
= { { NULL, NULL }, my_Input, PF_INET, NF_IP_PRE_ROUTING,
NF_IP_PRI_NAT_DST-1 };
Now in this when i get a packet based on certain condition
i use NF_STOLEN.
Now the scenario is that i want to register iptables with
REDIRECT facility also.
The reason is that if i get a packet which has destination
port 80 i will redirect to 5555 where i run squid proxy.
so i use a policy like
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j
REDIRECT --to-port 5555
So for this to happen iptables should get the packet first
before my module otherwise i will steal the packet and iptables will not
get the packet.
So i registered my module first and then try to insmod iptables
modules. ip_conntrack.o refuses to insmod saying that resource busy. so
without conntrck i cannot use REDIRECT. Why is this happening?
Next if first register iptables and then my module then every
thing works fine. But packets are not coming to iptables .
Only my modules get it. So how can i overcome this situation? How to
change my module reg functionality to suit the scenario?
The important thing is that once iptables hits on the above policy
then my module should get the packet after iptables.
Please help me.
Iam working on 2.4 kernel
Varun
next reply other threads:[~2006-06-09 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 12:35 varun [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-01 6:03 netfilter reg problem varun
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=44896AF9.1020606@rocsys.com \
--to=varun@rocsys.com \
--cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.