일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 리눅스보안
- 웹모의해킹
- NEXUS
- 정보보안기사
- 정보보안
- DreamHack
- 보안컨설팅
- snort2.9
- 데이터모델링
- Bigdata
- gns3
- Python
- dreamhack.io
- AI
- M1
- Synology
- GitLab
- docker
- 정보보안산업기사
- 유닉스
- VMware
- NQ5
- 모의해킹
- 취약점진단
- 드림핵
- 리눅스
- 스노트
- 보안기사실기
- 기아
- Snort
Archives
- Today
- Total
Security_Analysis
Snort 설정(conf) 본문
728x90
반응형
Snort 2.9 버전 설치방법은 전 게시물을 참고...
Snort 설정
Snort 명령은 "-T" 옵션을 사용하여 설정파일(snort.conf)에 대해 검증할 수 있다.
설치 직후 바로 설정파일에 대해 검증을 해보면 아래와 같다.
#snort -T -c "설정파일"
snort -T -c "/etc/snort/snort.conf"
1. /usr/local/lib/snort_dynamicrules : No such file or directory.
/usr/local/lib/snort_dynamicrules 디렉토리가 존재하지 않아서 발생하는 오류이므로, 해당 디렉토리를 생성 후 재 검증
mkdir /usr/local/lib/snort_dynamicrules
< 재검증 >
snort -T -c /etc/snort/snort.conf
2. /etc/snort//etc/snort/rules/local.rules(0) Unable to open rules file "/etc/snort//etc/snort/rules/local.rules" : No such file or directory.
/etc/snort/snort.conf 에는 "#site specific rules" 이라는 부분이 존재한다.
처음 snort를 설치하게 되면 loca.rules 부터 여러가지 rules에 대해 존재하지 않으므로 전부 주석처리 후 검증
# site specific rules 확인
cat /etc/snort/snort.conf | grep "include \$RULE_PATH"
vi /etc/snort/snort.conf
:%s/include $RULE_PATH/#include $RULE_PATH
/local.rules
# local.rules은 주석을 제거해주고
:wq!
# 저장 후 vi 편집기 종료 후 확인
# site specific rules 확인 (주석 되었는지 확인)
cat /etc/snort/snort.conf | grep "include \$RULE_PATH"
touch /etc/snort/rules/local.rules
< 재검증 >
snort -T -c /etc/snort/snort.conf
3. Unable to open address file ./../rules/white_list.rules, Error : No such file or directroy
역시나, snort 초기 설치하면 white_list.rules 및 black_list.rules 파일이 존재하지 않으므로 해당 파일을 생성해야 하며, /etc/snort/snort.conf 파일에서 white_list.rules 및 black_list.rules 에 대한 경로를 절대경로로 변경해줘야 한다.
cat snort.conf | grep -A2 appropriately
vi /etc/snort/snort.conf
# white_list.rules 및 black_list.rules 위치에 대해 절대경로로 변경
# 저장 후 vi 편집기 종료
cat snort.conf | grep -A2 appropriately
cd /etc/snort/rules
touch white_list.rules
touch black_list.rules
< 재검증 >
snort -T -c /etc/snort/snort.conf
Snort 2.9 설치 후 기본 설정 완료
2.9 설치 후 여러 작업을 통해 snort.conf 파일에 대해 검증이 완료되었다.
snort 홈페이지에서 rules을 다운받은경우 "/etc/snort/rules" 에 넣어주고, 해당 rules 이름을 snort.conf 파일에 추가해주거나 주석처리되어있으면 해제해주고 재검증 하면 된다.
728x90
반응형
'Operating System > Unix&Linux' 카테고리의 다른 글
CentOS7 Mirrorlist Update (2) | 2024.07.14 |
---|---|
Snort 2.9 설치 (0) | 2023.10.09 |
Ubuntu 16.04 LTS Setup Chrome Browser (0) | 2019.01.16 |
Ubuntu 16.04 LTS Setup "Atom Editor" (0) | 2019.01.16 |
Ubuntu 16.04 LTS apt update Error Command Fix (0) | 2019.01.16 |