Apache 2.2 설정에서 user-agent 로 검색봇 접근 차단하기 > 서버관리

본문 바로가기
사이트 내 전체검색

서버관리

Apache 2.2 설정에서 user-agent 로 검색봇 접근 차단하기

페이지 정보

profile_image
작성자 관리자 (61.♡.26.29)
댓글 0건 조회 2,652회 작성일 18-03-21 15:04

본문

아파치 서버 설정에서 user-agent 로 트래픽 차단하는 방법이다.

SetEnvIf 로 처리할 수도 있고,
BrowserMatch 로 처리할 수도 있다.

차이점은,
BrowserMatch 는 SetEnvIf User-Agent 와 같은(alias) 것이고,
SetEnvIf 는 여러가지 옵션을 줄 수 있다.

각각의 명령어 뒤에 붙은 NoCase 는 대소문자를 구분하지 않는다는 뜻이다.


One option to block specific user agents is to use this tutorial.
[code]
BrowserMatchNoCase python bad_bot
BrowserMatchNoCase catexplorador bad_bot
Order Deny,Allow
Deny from env=bad_bot
[/code]

The BrowserMatchNoCase allows case insensitive matches against the user agent.

A second option is to use the SetEnvIfNoCase command

[code]
#SetEnvIfNoCase Referer "^$" bad_user
#SetEnvIfNoCase User-Agent "^$" bad_user
SetEnvIfNoCase User-Agent "python" bad_user
SetEnvIfNoCase User-Agent "catexplorador" bad_user
SetEnvIfNoCase Request_URI "union select" sql_inject
Order Deny,Allow
Deny from env=bad_bot
[/code]


** 참고
https://www.tuxradar.com/answers/300
https://serverfault.com/questions/251988/blocking-apache-access-via-user-agent-string/252004
https://stackoverflow.com/questions/22871608/is-this-the-right-way-to-block-user-agents-i-find-on-my-logs


** apache 2.4 에서 설정방법
https://www.baragi.net/bbs/board.php?bo_table=dev&wr_id=8772

추천0

댓글목록

등록된 댓글이 없습니다.

Total 91건 1 페이지
  • RSS
서버관리 목록
번호 제목 조회 추천 날짜
911247007-23
902950002-13
893235012-24
883550012-08
873814007-01
862874006-08
851607004-22
841864004-07
열람중2653003-21
822909003-19
812079002-19
802429002-17
791678002-17
782828001-03
772992011-05
762915009-13
753351009-05
743458009-01
733520008-31
726757008-31

검색


사이트 정보

Copyright © Baragi.Net. All rights reserved.