Hello sohaib,
Different methods are possible - difficult to say which one is the best for your request without knowing more details (as what in particular you want to allow, block, is traffic between VMs allowed etc.).
But I would prefer a - from my point of view - much better solution:
*...