Wordpress + Cloudflare IP filtering (firewall) solution

Job ID: 34927029

Budget: $10 – $30 USD

I need a solution for filtering out (by IP and / or IP+mask) incoming connections.
Hosting is own vm (nginx, php, wordpress).
"iptables" blocking will not work because of Cloudflare CDN used.
Cloudflare doesn't have firewall anymore (free plan)
So I need getting real IPs from Cloudflare (already implemented) AND filtering this IPs.
Related categories: PHP Linux WordPress Nginx Cloudflare