Empty the dishwasher completely, and pour 1 gallon of vinegar down the dishwasher's drain. Leave this for a few minutes so any ants appearing from the drain are killed. Then, put the dishwasher on the hottest cycle possible and rub down the sides and surroundings of dishwasher in peppermint oil.
Ants usually find their way into a dishwasher through the dryer vents or the drain. Although most people's first reaction is to turn to pesticides to solve the problem, the chemicals contained in pesticides can be harmful for children and pets. Many natural insecticides are just as effective for the removal of ants, such as soap and water, boric acid, and diatomaceous earth.