Learn Pentesting like a Pro!

Share this post

Restrict by IP in Apache behind Cloudflare

pentesting.academy

Restrict by IP in Apache behind Cloudflare

pentesting.academy
Oct 5, 2019
Share this post

Restrict by IP in Apache behind Cloudflare

pentesting.academy

If you are using Cloudflare as first line of defense, and want to restrict by IP in the Apache webserver behind. Add this to your .htaccess:

SetEnvIF X-Forwarded-For "1.1.1.1" AllowIP
 
<RequireAny>
Require env AllowIP
</RequireAny>

Where 1.1.1.1 is the IP address that you want to allow access to your site, just replace it by your IP address.

Share this post

Restrict by IP in Apache behind Cloudflare

pentesting.academy
Comments
TopNew

No posts

Ready for more?

© 2023 pentesting.academy
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing