Particle restricted inside bounds of volume?

How can i simply keep a fire emitter within the bounds of a certain volume?

I guess the opposite scenario would be how do i block rain from the interior of my scene?

Cheers