CentOS 6 에서 iptables 로그 남기기
페이지 정보
작성자 관리자 (61.♡.222.236) 작성일 19-06-07 10:43 조회 2,764 댓글 0본문
센토스 6 시스템에서 iptables 의 로그를 남기는 방법을 설명한다.
1. rsyslog 설정
일단, 모든 로그 시스템을 관리하는 것이 rsyslog 이다.
기본 설정파일은 /etc/rsyslog.conf 이고, /etc/rsyslog.d/*.conf 를 사용할 수도 있다.
/etc/rsyslog.conf 에 보면, kern.* 부분이 아래처럼 주석처리 되어 있다.
#kern.* /dev/console
iptables 의 로그는 kern 에 해당하기 때문에, 이부분의 주석을 풀고 로그파일을 설정해 준다.
kern.* /var/log/iptables.log
rsyslog 를 재시작한다.
# service rsyslog restart
2. iptables 에서 설정
ㅁ LOG levels
[code]
Level name Description
0 emerg or panic Something is incredibly wrong; the system is probably about to crash
1 alert Immediate attention is required
2 crit Critical hardware or software failure
3 error Usually used for reporting of hardware problems by drivers
4 warning Something isn't right, but the problem is not serious
5 notice No problems; indicates an advisory of some sort.
6 info General information
7 debug Deguging
[/code]
http://fibrevillage.com/sysadmin/202-enable-linux-iptables-logging
참고
https://jm4488.tistory.com/45
1. rsyslog 설정
일단, 모든 로그 시스템을 관리하는 것이 rsyslog 이다.
기본 설정파일은 /etc/rsyslog.conf 이고, /etc/rsyslog.d/*.conf 를 사용할 수도 있다.
/etc/rsyslog.conf 에 보면, kern.* 부분이 아래처럼 주석처리 되어 있다.
#kern.* /dev/console
iptables 의 로그는 kern 에 해당하기 때문에, 이부분의 주석을 풀고 로그파일을 설정해 준다.
kern.* /var/log/iptables.log
rsyslog 를 재시작한다.
# service rsyslog restart
2. iptables 에서 설정
ㅁ LOG levels
[code]
Level name Description
0 emerg or panic Something is incredibly wrong; the system is probably about to crash
1 alert Immediate attention is required
2 crit Critical hardware or software failure
3 error Usually used for reporting of hardware problems by drivers
4 warning Something isn't right, but the problem is not serious
5 notice No problems; indicates an advisory of some sort.
6 info General information
7 debug Deguging
[/code]
http://fibrevillage.com/sysadmin/202-enable-linux-iptables-logging
참고
https://jm4488.tistory.com/45
추천0
댓글목록 0
등록된 댓글이 없습니다.