The usual solution is to install a water-filled bubbler/airlock on the top of the fermentation vessel. The airlock lets CO2 out in the form of bubbles but keeps air from getting in.
Another solution that has been put forth is the waterless airlock. These are specially made silicone stoppers with a pair of flapper valves inside a cylinder. The flappers go in only one direction, so gas can go out but not in. I didn't want to spend $3 for a valve and $8 for shipping, so I decided to go over to http://techshop.ws and make some of my own.
Step 1: Materials
- Silicone or rubber stoppers, food grade since they are intended for contact with your beer. You will want the ones with a hole in the center (or drill it yourself).
- Food-grade silicone caulk
- Clean typing paper