I had a rat problem in my barn few years ago. I took 4” PVC pipe cut in like 2’ sections and placed them along the walls where rat traffic was evident. I out rat poison blocks in the center of the pipe. Rats could get it but none of the chickens, barn cats or anything else could.