This could be achieved with a Pi, although one notably issue makes it an unlikely solution. The Pi only has one ethernet interface, and the kind of usage your describe is best implemented as either a router or a bridge containing two interfaces where traffic is filtered as it passes through from one to the other.
It is possible to eaves drop on a single wire and monitor traffic, but much more difficult to do anything about it. If you wanted to actually shape the traffic in any way, you would need to load the Pi up with another interface using a USB device and funnel all your traffic through it. Frankly I can think of other devices much more suited to this operation, including other one-board computers that have two ethernet interfaces out of the box.