Last active
July 14, 2022 17:02
-
-
Save sitemapxml/21f01a6e67308389d0f81b34b62cf7dc to your computer and use it in GitHub Desktop.
Allow access from CloudFlare IP range only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: https://stackoverflow.com/questions/65448093/allowing-only-cloudflare-i-p-range-through-htaccess-giving-403-error | |
#path to your website | |
<Directory "path/to/public_html/or/var/www/html"> | |
#ipv4 | |
Require ip 173.245.48.0/20 | |
Require ip 103.21.244.0/22 | |
Require ip 103.22.200.0/22 | |
Require ip 103.31.4.0/22 | |
Require ip 141.101.64.0/18 | |
Require ip 108.162.192.0/18 | |
Require ip 190.93.240.0/20 | |
Require ip 188.114.96.0/20 | |
Require ip 197.234.240.0/22 | |
Require ip 198.41.128.0/17 | |
Require ip 162.158.0.0/15 | |
Require ip 104.16.0.0/12 | |
Require ip 172.64.0.0/13 | |
Require ip 131.0.72.0/22 | |
#ipv6 | |
Require ip 2400:cb00::/32 | |
Require ip 2606:4700::/32 | |
Require ip 2803:f800::/32 | |
Require ip 2405:b500::/32 | |
Require ip 2405:8100::/32 | |
Require ip 2a06:98c0::/29 | |
Require ip 2c0f:f248::/32 | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment