Excellent advice with videos.
https://www.backyardchickens.com/threads/rat-control-the-video-series.1337456/
We have a couple of barn cats that keep the other farmer's rats away from our place though. I also had one farmer try the baking soda/cornmeal wive's tale and she said it worked.