https://www.cloudflare.com/ko-kr/ips/
IP Ranges
This page is intended to be the definitive source of Cloudflare’s current IP ranges.
www.cloudflare.com
위에 클라우드플레어의 IP Ranges 페이지에 들어가 클라우드플레어의 아이피 대역만 아파치 서버에 접속이 가능하도록 설정한다.
이는 공격자가 클라우드플레어를 거치지 않고 직접 실제 서버 아이피를 알아내서 DDoS 공격의 피해력을 줄이기 위해서다.
.htaccess
#path to your website
<Directory "/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>
Allowing only cloudflare i.p range through .htaccess giving 403 error
I've been trying to allow only cloudflares i.p ranges on my server but I keep getting 403 errors, 403 is what people bypassing cloudfare should see I have tried #cloudflare order deny,allow...
stackoverflow.com
참고:
https://xetown.com/tips/253152
클라우드플레어 사용시 서버 IP 노출 방지 체크리스트
요즘 클라우드플레어를 사용하는 사이트가 부쩍 늘었죠? 서버의 트래픽을 절약해 주기 때문에 사용하시는 분들이 제일 많지만, 공격을 차단해 주고 실제 서버의 IP를 숨겨주기 때문에 사용하시
xetown.com
https://xetown.com/questions/415978
CloudFlare IP Range는 왜 필요한건지요?
안녕하세요. 또 클플 관련 질문을 올립니다 ㅎㅎ 클플 사이트에 보면 IP Ranges라는게 있는데, 이건 뭐할 때 활용하는 건지 궁금합니다. (https://www.cloudflare.com/ips/) 해당 ip들을 오리진 서버에서 허용
xetown.com
'⚙️백엔드 > 아파치' 카테고리의 다른 글
아파치 - 구글 캡챠(reCAPTCHA) 적용하기(PHP) (0) | 2023.09.02 |
---|---|
아파치 - 세션 시간 변경(php.ini) (0) | 2023.04.08 |
아파치 - 도메인으로만 접속 허용하게(ip는 차단) (0) | 2023.04.03 |
아파치 - 특정 확장자 외부 접속 금지하기(.htaccess) (0) | 2023.03.31 |
아파치 - .php 확장자 없이 URL 접속하기 (0) | 2023.03.31 |