Michael Lubas - Classifying Bot IP Addresses in Phoenix
Cloud providers today publish the IP ranges of their servers. This is useful data for stopping malicious traffic to your Phoenix app. Learn how to classify incoming requests using persistent_term, radix trees, and a simple plug. This talk will cover: 1. A brief description of how bots cause problems in Phoenix apps, showing why someone would want to classify requests as coming from a bot. 2. The design of a plug to compare each incoming request's IP against a radix tree of public cloud provider IP ranges. 3. Why persistent_term is better than ETS for this task 4. How to use this plug to prevent bot attacks in your Phoenix app This talk is based on the blog post - https://paraxial.io/blog/cloud-ips
August 30, 2022