name server 에서 누군가가 나의 서버를 이용해서 query 를 날리는 내용을 확인하고 싶을때가 있다.

그러기 위해선 query log 를 남겨야 되는데 여기서 주의 할점은 chroot 이다.

chroot 가 적용되지 않은 시스템은 query log 경로를 아무 곳이나 정해도 상관 없지만.

만약 chroot 를 적용한 시스템이라면 /var/named/chroot 가 최상위 디렉토리라는 것을 명심하자

/etc/named.conf 에 query log 관련 셋팅

logging {
        category lame-servers { null; };
        category notify { null; };
        channel "query_logging" {
            file "/var/log/query_log" versions 3 size 100M;
            print-time yes;              
            print-category yes;
            print-severity yes;
        };

        category queries {
        query_logging;
        };
};

위 처럼 설정 한 후 query_log 파일을 만든다. 권한은 named(user),named(group) 

실제 경로 /var/named/chroot/var/log 이지만 named 의 최상위 경로가 /var/named/chroot 이기 때문에 file 항목에 "/var/named/chroot" 는 입력하지 않아도 된다.

만약 file 항목의 경로가 잘못되면 /var/log/messages 항목에 file not found 등의 메시지를 출력 한다.

위 항목을 적용 후 query_log 의 내용을 확인해서 log 가 정상적으로 쌓이면 정상이다.


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2008/10/09 15:46 2008/10/09 15:46
, , ,
Response
0 Trackbacks , 0 Comments
RSS :
http://blog.blog.n-nuri.com/rss/response/573

Trackback URL : http://blog.blog.n-nuri.com/trackback/573

Leave a comment
[로그인][오픈아이디란?]

블로그 이미지

http://blog.n-nuri.com 이 접속이 안 될경우 http://x2x.dnip.net 으로 접속해 주세요 공유하지 않는 지식은 썩은 물과 같다~~~!!!

- 삐꾸강아쥐

Archives

Recent Trackbacks

Calendar

«   2009/01   »
        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 31

Site Stats

Total hits:
227678
Today:
29
Yesterday:
279
free counters