Important: When setting restrictions on Cloudflare, don't forget to set restrictions on the API. This is critically important because restrictions on Cloudflare only limit the visual representation of the admin panel and do not limit requests to the Admin API.
To restrict access to the admin panel by IP, you need to log into your CloudFlare account
Go to Security -> WAF
Click the Create rule button in the Custom rules section.
Fill out the form: \
Rule name: Admin block ip
When incoming requests match…
Field: Hostname
Operator: is in
Value: %Your panel domain without https and slashes%\