For rats you need 1/2" or smaller. I've found a rat with its head shoved through a 1/2" gap, so that's pretty close to being able to squeeze all the way in.1. If you main predators are rats and foxes, you'll want to cover any holes 1" or wider to keep rats out. And if your coop/run doesn't have a solid floor, dig a trench around at the base of the walls and bury an attached hardware cloth apron underground. That helps prevent foxes digging under.
The main downside is that I have to enter the run and lift the whole roof off the dog house to gather eggs. But not bad considering the house was free!
Also an apron lying flat on the surface around the coop/run works pretty well and is easier to install than a buried apron (especially with hard/dense soil, areas with tree roots, etc).
I used to have a dog house as a communal nest box - and mine was free as well! Lifting the roof off to get the eggs got pretty tiring after a while though, especially in the rain and snow.