Question about a kernel module adding an iptables rule...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I was wondering if there was a simple way for a kernel module
to create a NAT rule "on the fly".  For example, a TCP connection
request (i.e. SYN packet) is received by its destination host,
and that host (for whatever reason) wants a different host to
service this connection...

I've got a kernel module listening for these "connection redirects"
on the gateway into the complex, and would like it to be able to
insert a rule into the NAT table then send the packet up to ip_rcv()
such that this specific connection will end up being NAT'd to the
other host.

Is there a simple way to accomplish this?  I was hoping there
would be an insert_rule() function, but it looks like the tables
are modified by a doing a get_table(), modify the local copy, then
replace_table().

Any help you could pass onto me would be greatly appreciated!

Thank you,
Duane Cloud


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux