I think using Cloudflare is the best way, even if you blocked those bots, and malicious IPs on your Laravel app they still hit your server origin and will also count as traffic.
Oct 26, 2022
2
Level 6
What's the best way to block IPs from accessing my Laravel site?
I've noticed that there's a large amount of "junk" traffic trying to access my site - likely bots or hackers trying to repeatedly log in or sign up. I do employ recaptcha, so they don't typically successfully sign up and are unable to hit most routes, but I can see logs of lots of attempts. I'd like to implement something that will block their IP for even hitting a login page.
Any suggestions that I can easily implement in Laravel?
Please or to participate in this conversation.