New User - Suggestions on securing site with limited server access

So I’m with a web host that specialises with a specific product we use on our website. I have limited access to a cPanel instance (99% sure it’s a customer portal and not WHM).

I’ve got my DNS setup and working on Cloudflare (Yay!). Having read this article (Allow Cloudflare IP addresses · Cloudflare Fundamentals docs) I realised that the only way I was going to secure it is with a .htaccess file (as I haven’t got access to the server any other way). I’m a bit annoyed about this, but created the .htaccess file with the below settings:

<RequireAny>
require ip 173.245.48.0/20
require ip 103.21.244.0/22
require ip 103.22.200.0/22
... (etc. for all the other CF IPs)
</RequireAny>

Well that didn’t work well! I lost access to the site. I then added another “require ip” line with my own IP address and I could access my site again.

Any idea why this wouldn’t work? Or ways to work around it?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.