BLOG main image
전체 (70)
글-음악 (12)
리눅스 (51)
기타 (1)
그림-사진 (6)
125382 Visitors up to today!
Today 11 hit, Yesterday 5 hit
daisy rss
tistory 티스토리 가입하기!
'mod_security'에 해당되는 글 1건
2007/11/25 15:41
아파치 2.2.6  컴파일 설치 운영 중  웹서버 보안 mod_security2의 설치

최신 다운로드  (modsecurity-apache_2.1.3)
wget http://www.modsecurity.org/download/modsecurity-apache_2.1.3.tar.gz

압축 풀고 두군데 /apache2/Makefile 수정
vi Makefile
- top_dir = "웹서버위치"     #예) /usr/local/apache_2.2.6 or  /usr/local/apache # 난 심볼링크라 이거
  INCLUDES = -I /usr/include/libxml2 에서 다음과 같이 붙여 준다 -I/usr/include/libxml2

make && make install

아파치 정지 /etc/init.d/httpd stop

다음줄 추가 httpd.conf
LoadFile /usr/lib/libxml2.so   # 이거 알아내느라 구글링 좀 함!!!
LoadModule security2_module modules/mod_security2.so
<IfModule mod_security2.c>  #요기 중요 2 꼭 넣을것 ㅎㅎ
Include conf/modsecurity.conf
</IfModule>

conf/modsecurity.conf 에 Security 룰 설정
코어 다운 하든가 http://www.modsecurity.org/download/modsecurity-core-rules_2.1-1.4.3.tar.gz
국가가 하라는거 하든가 http://www.krcert.or.kr/firewall2/index3.jsp (한국인터넷침해사고대응센터)
※ 난 나만의 노하우 적용

문법 검사 /etc/init.d/httpd -t

아파치 재시작 /etc/init.d/httpd start

확인  phpinfo 정보
[##_1C|fk010000000004.png|width="424" height="113" alt="사용자 삽입 이미지"|_##]웹서버  정보 확인  으잉~~~  이런 APCHE 2.2.6 ...
.. 이런 아파치 에러 로고를 보니 동작을 안하고.... 있던 것이 었단 것이 었다.
에러 메세지  
[error] ModSecurity: ModSecurity requires mod_unique_id to be installed.

그래서 아파치 소스 다시 다운  #빠른 국내 미러 이용
wget http://apache.tt.co.kr/httpd/httpd-2.2.6.tar.gz

모듈 올림
httpd-2.2.6/modules/metadata 에서
/usr/local/apache/bin/apxs -cia mod_unique_id.c 로 모듈 적재

다시 404 페이지로 확인
[##_1C|fk010000000005.png|width="496" height="208" alt="사용자 삽입 이미지"|_##]흐흐 웹 서버정보가  마소의 IIS 8.0  ----  8.0 나왔나요?  ㅋㅋ 해킹에 취약 할텐데  Microsoft-IIS/8.0
[##_1C|gk010000000004.png|width="541" height="214" alt="사용자 삽입 이미지"|_##]                                                                                              OS : Windows ?


참고 주소
http://www.modsecurity.org
http://www.krcert.or.kr
참고 문서
http://www.modsecurity.org/documentation/modsecurity-apache/2.0.2/modsecurity2-apache-reference.html#02-installation
진보블로그 공감 버튼트위터로 리트윗하기페이스북에 공유하기딜리셔스에 북마크
2007/11/25 15:41 2007/11/25 15:41
prev"" #1 next