listen the packet in router
consider
3 pcs
pc 1 sends packet to pc 2 through pc 3
(by listening to the eth0 at pc 2)
pc 2 gets the message send from pc 1 to pc 3 for checking some information, if okay forward to pc, if not okay drop it~~
I now have a problem:
I can get the message passing through pc 2 and display at pc 2,
but how I can stop forward to pc 3?????
I have tried
pass the packet to the usespace by using
iptables -j QUEUE.....and then run the same program in userspace
However, it turns out that I get nothing at pc 2,not to say at pc 3.
I have guessed why this problem happens,
1)is it the connection between pc 1 and pc 3 has not been made, so no data sending from pc 1 to pc3.
2)the program for listening the packet at pc 2 is run in userspace, so it starts listening eth0 after the packet has already been passed through it.
So at pc 2 receive nothing...............
so how I can solve ???Am I wrong.??
Thanks all~~~~~I need to solve ......it ....~~
|