Model originally uploaded to Thingiverse at https://www.thingiverse.com/thing:4942064.
Update: kerusursaone has improved on this thing a lot, check out his design instead: https://www.thingiverse.com/thing:4947885
Designed this simple test tube portal for 16mm test tubes.
The tunnel can be covered with transparent material. I cut a trip out of a transparent PET juice bottle. Because the plastic is curved slightly, it presses down nicely and ensures no ants can escape. I pierced some holes in the plastic to allow the ants to breathe.
I added the openscad project file, but this is a quick hackjob and likely not easily customized.
I have no experience with ant keeping (other than killing my first queen), all feedback and suggestions welcome.
I printed it in ASA with 10% infill, it came out ok, but one of the corners lifted a bit. PLA might be a better choice.