Here's the setup:
Host A : 192.168.0.5/24 Host B : 192.168.0.6/24 Host C : 192.168.0.1/24
All connected via switch.
I want to monitor traffic between A and B by setting a route on A and B to use C as their GW for each other.
I can get this to work fine if A and B are on different subnets, but was hoping there would be a way to do it with all on the same subnet.
S0 first I setup routes on both A and B by issuing
route add -host B gw C
(and vice versa for B)
On C i enable forwarding. When i run wireshark on C, and then ping from A to B, I see the ping request come in from A, with A's MAC sent to C's MAC. then C retransmits using C's MAC to B's MAC.
A and B both have 'accept_redirects' off so that they are forced to use C.
Problem: pinging from A to B never works. Wireshark on B never shows an incoming ping request.
Wireshark on C shows its being sent to B's ip/mac, but it looks like B never gets it, or its being filtered out somewhere below wireshark.
any hints? what could be filtering out the packet?