how to setup bind9 logging for ISPC2 on Debian Lenny (/etc/default/rsyslog)

Discussion in 'Installation/Configuration' started by radim_h, Jan 23, 2009.

  1. radim_h

    radim_h Member

    Hello,

    im moving server with ispconfig 2.2.29 on Debian Lenny

    Evertyhing seems to working fine
    but i have no idea how to setup bind9 logging
    as described here
    http://www.howtoforge.com/perfect_setup_debian_etch_p4
    changing SYSLOGD="-a /var/lib/named/dev/log"
    in /etc/default/syslogd

    (i actually don't know what is this change doing)

    as Lenny is using rsyslog by default

    how should i change /etc/default/rsyslog ?
    there is by default

    # Options for rsyslogd
    # -m 0 disables 'MARK' messages (deprecated, only used in compat mode < 3)
    # -r enables logging from remote machines (deprecated, only used in compat mode < 3)
    # -x disables DNS lookups on messages received with -r
    # -c compatibility mode
    # See rsyslogd(8) for more details
    RSYSLOGD_OPTIONS="-c3"

    Thanks for any help


    btw: all others descibed in prefects setup for etch is working
    except there is no package libdb4.3-dev i have replaced it with libdb4.6-dev
     
    Last edited: Jan 23, 2009
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you run
    Code:
    man rsyslogd
    and check if there's also a -a switch available for rsyslogd?
     
  3. radim_h

    radim_h Member

    there is not -a option.


    Sorry for bothering, i have found the solution here: http://www.dmo.ca/blog/20081009143754


    So all we need to do is:

    Stop bind:

    Code:
    /etc/init.d/bind9 stop
    edit (create)
    nano /etc/rsyslog.d/bind-chroot.conf and add line
    Code:
    $AddUnixListenSocket /var/lib/named/dev/log
    check the you have added following in bind conf as described in etch perfect setup
    nano /etc/default/bind
    Code:
    OPTIONS="-u bind -t /var/lib/named"
    restart rsyslog
    /etc/init.d/rsyslog restart

    make sure it creates /dev/log in the chroot:
    Code:
    ls -al /var/lib/named/dev/log
    srw-rw-rw- 1 root root 0 2009-01-24 13:45 /var/lib/named/dev/log
    start bind
    Code:
    /etc/init.d/bind9 start
    and make sure in works
    Code:
    ps ax | grep [n]amed
    28512 ?        Ssl    0:00 /usr/sbin/named -u bind -t /var/lib/named
     
    Last edited: Mar 19, 2009

Share This Page