How to forward a modified packet by using libnetfilter_queue

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

 



Hi,

I want to forward a packet modified by libnetfilter_queue.

In detail, suppose a TCP packet is delivered from host1 to host2 as followings.

host1 ---> server --> host2

Here, a server is connected both to host1 and to host2. (to two NICs)
First, host1 sends a TCP packet for host2.
When a packet comes into server, the server modifies the packet(header
or payload).
Then, the server forwards the modified packet to host2.

----------------------------------------------------------
I know how to intercept incoming packet at a server by iptables and
netfilter_queue, but I don't know how to forward the modified packet
to host2.

In detail, I create a NFQUEUE using iptables and I use modified
"nfqnl_test.c" to intercept and modify a packet. Problem is how to
forward the modified packet to an original destination of the packet
(In above scenario, to host2)

Should I add some filter rules with iptables or should I add some
codes in "nfqnl_test.c" ?

Any suggestions would be helpful for me.
Thanks in advance.

Danny
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux