Carpenter ants require a water source to survive. To prevent brown, red or black carpenter ants in the house, eliminate sources of moisture or standing water. Keep tree branches and other plants cut back from the house. Sometimes pests use these branches to get into your home. Make sure that there are no cracks or little openings around the bottom of doors or around windows. Seal all openings with a silicone-based caulk. Also, keep firewood and building materials stored away from the home. Carpenter ants like to build nests in stacks of wood.