Make a mixture of 50/50 water and vinegar and pour it into a spray bottle. Spray the surface with the solution several times a day. Ants guide themselves with their scent. Vinegar has a natural chemical that alters ants' scent and which ants avoid.
Sprinkle black pepper where you see them congregating and watch 'them scatter. Follow them to where they're exiting - which is the same spot they're entering in at - and sprinkle the pepper at that spot to keep them from coming back in. It's safe to use in your cabinets, on windowsills, near your Equal parts Windex and Ivory Soap. Simply mix, and spray problem areas.
D-earth is safe for mammals, birds and reptiles. You can find it in garden supply centers. Catnip, spearmint plants, cinnamon, sugar or a chalk line also deter ants. A mixture of water, white vinegar and dish soap works, or put active dry yeast, molasses or honey made into a paste in a jar to attract ants. They crawl inside, eat, get stuck and die. Check for tree branches leaning on your roof since ants can crawl through gutters and sneak into your house.
Read more: Can I get a natural, safe ant killer?