All of lore.kernel.org
 help / color / mirror / Atom feed
* Help needed on standalone nat for opening new ports inside the code
@ 2004-02-14 10:50 Nagaraj G
  2004-02-14 11:17 ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Nagaraj G @ 2004-02-14 10:50 UTC (permalink / raw)
  To: netfilter-devel

Hello,

I am writing a new netfilter application module where-in I have to
mangle each and every packet. So, I have made the module as a standalone
NAT with NAT_ALWAYS flag defined.

I am using linux 2.4.10 kernel and the related files.

Masquerading is enabled.

My protocol behaves like this.

1. A packet destined to the well-known port comes to the netfilter from
an internal host. This packet gets mangled via the Nat_Help routine
registered via the register_nat_helper.

2. The reply for the above packet does not come on the same connection.
The reply comes in on the same well-known port from the remote
ip-address.

For the above case, I don't want to define a "iptables" rule hard-coded
as I don't know who is coming in and when.

So, I want to create the connection dynamically to open the well-known
port only for the remote ip-address.

I tried doing ip_conntrack_expect_related(). But it fails with -16
(EBUSY).

I don't get the reply back from the remote ip-address unless I create
the port-forwarding rule manually.

How do I achieve the functionality required in case of standalone-nat?

Thanks in advance for the great reply.

Best Regards,

GNRaj

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

end of thread, other threads:[~2004-02-15  4:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-14 10:50 Help needed on standalone nat for opening new ports inside the code Nagaraj G
2004-02-14 11:17 ` Patrick McHardy
2004-02-15  4:59   ` Nagaraj G

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.