I put the filter behind the fan, the reason being that the filter will be sucked onto the fan, thus providing a better seal between the fan and filter than it would be if the filter was in the front and being actively pushed away from the fan by the air.