I have 4 IP interfaces that I have created using the TUN/TAP driver. I want to divide these into 2 groups of 2 each and prevent IP forwarding between the groups but allow forwarding within a group. Is there a way to accomplish this?

TIA.