Is there a durable surface that ants can't pass?
I've found that ants do not walk through petroleum jelly. It is also convenient, as it isn't too messy, and can be whatever shape you want. I use it to keep ants from climbing into my hummingbird feeders. Make sure the area you treat is wider than the ant is long.