Computer ???
No. | 434 |
Name. | swindler |
Subject. | Linux용 침입탐지시스템(IDS) Snort 설치 |
Main Cate. | Linux |
Sub Cate. | |
Date. | 2013-09-17 13:20 |
Hit. | 7775 (211.36.27.3) |
File. | |
http://www.snort.org 먼저 필요한 패키지 설치 yum install gcc flex bison zlib zlib-devel libpcap libpcap-devel pcre pcre-devel libdnet libdnet-devel tcpdump www.snort.org에서 아래 두 파일 다운로드 설치파일 : snort-2.9.5.5.tar.gz 룰파일 : snortrules-snapshot-2.9.tar rule파일은 회원가입을 해야 다운로드가 가능함 설치과정중에 아래와 같은 에러가 발생 할 수 있다. ERROR! dnet header not found, go get it from http://code.google.com/p/libdnet/ or use the --with-dnet-* options, if you have it installed in an unusual place 위URL에서 다운받아 설치하면 된다. etc 파일 설정 [root@localhost snort-2.8.4.1]# mkdir /etc/snort [root@localhost snort-2.8.4.1]# cd /tmp/snort-2.8.4.1/etc [root@localhost etc]# cp * /etc/snort/ -v [root@localhost etc]# cd /etc/snort [root@localhost snort]# vi snort.conf var RULE_PATH ../rules <-- /etc/snort/rules 으로 수정 var PREPROC_RULE_PATH ../preproc_rules <-- /etc/snort/preproc_rules 으로 수정 [root@localhost snort]# mkdir /var/log/snort RULE 파일 설정 [root@localhost snort]# cd /etc/tmp [root@localhost tmp]# cp snortrules-snapshort-2.8.tar.gz /etc/snort [root@localhost tmp]# cd /etc/snort [root@localhost snort]# tar xvfz snortrules-snapshort-2.8.tar.gz Test [root@localhost snort]# /usr/local/bin/snort -c /etc/snort/snort.conf -> 아래와 같은 에러 발생 ERROR: /etc/snort/snort.conf(253) Could not stat dynamic module path "/usr/local/lib/snort_dynamicrules": No such file or directory. -> 디렉토리를 생성한다. mkdir -p /usr/local/lib/snort_dynamicrules 아래와 같은 에러 발생 ERROR: /etc/snort/snort.conf(511) => Unable to open address file /etc/snort/../rules/white_list.rules, Error: No such file or directory Fatal Error, Quitting.. 파일 2개 생성 touch /etc/snort/rules/white_list.rules /etc/snort/rules/black_list.rules /etc/snort/snort.conf 파일에서 white_list.rules와 black_list.rules 경로를 적절히 세팅한다. 데몬만들기 [root@localhost snort]# cd /usr/sbin [root@localhost sbin]# ln -s /usr/local/bin/snort snort [root@localhost sbin]# cd /tmp/snort-2.8.4.1/rpm [root@localhost rpm]# cp snortd /etc/init.d/ [root@localhost rpm]# cp snort.sysconfig /etc/sysconfig/snort [root@localhost rpm]# chmod 700 /etc/sysconfig/snort [root@localhost rpm]# vi /etc/sysconfig/snort INTERFACE=eth0 - 모니터링할 인터페이스 설정 ifconfig -a 정보 참고 CONF=/etc/snort/snort.conf - snort config 파일 경로 설정 USER=snort <- root로 변경 GROUP=snort <- root로 변경 - 데몬 실행 주체 설정 (snort로 할경우 별도 유저/그룹 추가 및 환경설정 파일의 소유권을 모두 snort로 변경해야 함. 본 문서에서는 root로 설정함) LOGDIR=/var/log/snort <- 로그가 저장될 경로 설정 [root@localhost rpm]# cd /etc/init.d [root@localhost init.d]# chmod +x snortd [root@localhost init.d]# ./snortd start <- 에러나면 트러블슈팅 [바로가기 링크] : http://coolx.net/cboard/computer/434 |
|
|
|
[Modify] [Delete] | [Reply] [List] |