I’m a big fan of the 6G firewall, from Jeff Starr of Perishable Press. It lives in my .htaccess file, and does a great job of protecting my site against a wide variety of malicious requests, bad bots, spam referrers, and other attacks. It adds 76 lines to my .htaccess file, some of them filled with long regular expressions. WordPress and Litespeed Cache also add chunks to my .htaccess file. And, .htaccess being exceptionally flexible and useful, I add other stuff as well.