mod_security2 적용

HTTPD 조회 수 4527 추천 수 0 2017.02.10 10:19:27

modsecurity 소스 다운로드

cd /usr/src/
wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz
tar zxvf modsecurity-2.9.1.tar.gz

 

modsecurity 소스 컴파일
cd modsecurity-2.9.1/
./configure --with-apxs=/apm/server/apache/httpd/bin/apxs --with-apr=/apm/server/apache/apr/ --with-apu=/apm/server/apache/apr-util-1.5.4/

make

 

modsecurity 모듈복사

cp apache2/.libs/mod_security2.so /apm/server/apache/httpd/modules/

 

modsecurity 룰셋 다운로드
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git
cd owasp-modsecurity-crs/

 

modsecurity 룰셋 복사
cp crs-setup.conf.example /apm/server/config/extra/crs-setup.conf
cp -R rules /apm/server/config/extra/

 

modsecurity httpd 적용

vi /apm/server/config/httpd.conf

LoadModule security2_module modules/mod_security2.so
<IfModule security2_module>
Include /apm/server/config/extra/crs-setup.conf
Include /apm/server/config/extra/rules/*.conf
</IfModule>

 

httpd 재시작

systemctl restart apache.service

 

mod-se.png

 

 

첨부
엮인글 :
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
12 HTTPD mod_http2 적용하기 file LynX 2017-02-10 4892
» HTTPD mod_security2 적용 file LynX 2017-02-10 4527
10 PHP php opcache 설치 file LynX 2016-10-14 1878
9 E-Mail RoundCube 첨부 용량 변경 / 한글 수정 LynX 2016-09-22 1456
8 HTTPD Apache httpd 2.4 mod_deflate file LynX 2017-02-10 1341
7 PHP hhvm install file LynX 2017-02-10 654
6 PHP php7에 memcache.so 확장 모듈 적용 LynX 2016-09-26 553
5 Xpress Engine XE에 memcache 사용 설정 LynX 2016-09-26 507
4 Linux Common 시간 설정 file LynX 2016-10-10 470
3 Xpress Engine mobileex 사용하여 모바일에서 첨부파일 올릴때 무한 로딩 현상 LynX 2016-09-27 461
2 PHP php에 memcached.so 확장 모듈 적용 LynX 2016-09-26 414
1 Linux Common Linux 정규식과 표현 LynX 2016-09-22 351