Learn Pentesting like a Pro!

Share this post

Restrict by IP in Apache behind Cloudflare

pentesting.academy

Discover more from Learn Pentesting like a Pro!

Stay updated on the latest cybersecurity insights from Cloud and Mobile to Blockchain. (HUNDREDS OF SUBSCRIBERS)
Continue reading
Sign in

Restrict by IP in Apache behind Cloudflare

DH
Oct 5, 2019
Share this post

Restrict by IP in Apache behind Cloudflare

pentesting.academy
Share

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
Share
Previous
Next
Comments
Top
New

No posts

Ready for more?

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