MYDNS AXFR Problem

Discussion in 'General' started by DFen, Jul 1, 2009.

  1. DFen

    DFen New Member

    I have recently installed ISPConfig-3.0.1.3.tar.gz on Centos 5.3 and have been trying to set up a domain in mydns

    The domain set-up is all ok through ispconfig, but when I try to configure axfr to propogate the domain to an external nameserver I get
    IN AXFR my.test.domain. REFUSED AXFR_disabled 0 0 0 0 LOG N QUERY ""

    Note1: AFXR comma separated list does not allow embedded spaces

    I have tried changing just about everything in /etc/mydsn.conf and restarting the service every time, but no joy.

    Eventually I downloaded the sources, recompiled and as thouh by magic it works!

    cd /usr/local/src
    wget http://mydns.bboy.net/download/mydns-1.1.0.tar.gz
    tar -xzf mydns-1.1.0.tar.gz
    cd mydns-1.1.0
    ./configure

    ## edit src/mydns/axfr.c, alter active=1 to active='Y'
    diff axfr.c axfr.c.org
    175c175
    < /*
    ---
    >
    178,180d177
    < */
    < querylen = snprintf(query, sizeof(query), "SELECT xfer FROM %s WHERE id=%u%s",
    < mydns_soa_table_name, soa->id, mydns_rr_use_active ? " AND active='Y'" : "");


    make
    make install
    # this installs to /usr/local/sbin

    Then I edited /etc/init.d/mydns making changes as sown below to use the new version of mydns

    Edit /etc/init.d/mydns
    #
    #PATH=/sbin:/bin:/usr/bin:/usr/sbin
    PATH=/usr/local/sbin:/sbin:/bin:/usr/bin:/usr/sbin
    mypath=/usr/local/sbin
    prog=mydns
    myprog=$mypath/$prog
    options='-v'
    ~~~
    start(){
    echo -n $"Starting $prog: "

    #daemon $prog -b $options
    daemon $myprog -b $options
    RETVAL=$?
    echo
    touch /var/lock/subsys/mydns
    return $RETVAL
    }
    #


    I would be interested to know what is wrong with the rpm version?

    DFen
     
    Last edited: Jul 2, 2009
  2. falko

    falko Super Moderator Howtoforge Staff

    I have no idea. That's the first time I hear of this problem.
     
  3. DFen

    DFen New Member

    My mistake
    I also altered axfr.c to check for active='Y' instead of active=1

    I have altered the original post to reflect this.

    Note also
    to build on 64bit I used:
    ./configure --with-mysql-lib=/usr/lib64/mysql/ --with-zlib=/usr/lib64/
     
    Last edited: Jul 2, 2009
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This has been fixed by the mydns developers some time ago. So check if you used the latest mydns-ng release.
     
  5. DFen

    DFen New Member

    Many thanks for that.

    No, I used the instructions in:
    http://www.howtoforge.com/perfect-server-centos-5.3-x86_64-ispconfig-3-p5

    Which instruct use of mydns, not mydns-ng (beta?)

    wget http://mydns.bboy.net/download/mydns-mysql-1.1.0-1.i386.rpm
    rpm -ivh mydns-mysql-1.1.0-1.i386.rpm

    I guess I should
    download and make mysql-ng
    remove rpm mydns-mysql-1.1.0
    make install mysql-ng

    DFen
     
  6. rukus77

    rukus77 Member

    Hi DFen, I ran into the same issue so decided to try out mydns-ng as well.

    I installed it, but was wondering if it needs a file in /etc/init.d/ like mydns had?

    I am able to run it using "mydns -b" but is this the correct way?

    Thanks for your time,
    Mike
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The installation of mydns-ng is described in the perfect server guide.
     
  8. rukus77

    rukus77 Member

    Hi Till,

    I searched howtoforge, but could not find any documentation for mydns-ng on Centos.

    Thanks,
    Mike
     
  9. DFen

    DFen New Member

    This is what I did to install mydns-ng, the instructions were NOT (at the time) in Centos 5 Perfect Server.

    yum remove mydns (If the rpm was installed)

    wget http://downloads.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.27.tar.gz?use_mirror=kent [^] [^]
    tar -xzf mydns-1.2.8.27.tar.gz
    cd mydns-1.2.8
    ./configure
    # on 64 bit
    ./configure --with-mysql-lib=/usr/lib64/mysql/ --with-zlib=/usr/lib64/

    make
    make install

    You will need to re-create /etc/init.d/mydns - you should find the rpmsave version is still in /etc/init.d so you could simply try renaming it.

    Also check /etc/mydns.conf

    # I did this:
    MYDNS

    Edit /etc/mydns.conf

    Note: the position of these values in the conf file seems to be significant. Placing the new values at the end does NOT appear to work
    [...]
    # ESOTERICA

    log = LOG_DAEMON # Facility to use for program output (LOG_*/stdout/stderr)
    pidfile = /var/run/mydns.pid # Path to PID file
    timeout = 120 # Number of seconds after which queries time out
    multicpu = 1 # Number of CPUs installed on your system
    recursive = # Location of recursive resolver
    allow-axfr = yes # Should AXFR be enabled?
    allow-tcp = yes # Should TCP be enabled?
    #allow-update = no # Should DNS UPDATE be enabled?
    allow-update = yes # Should DNS UPDATE be enabled?
    notify-enabled = yes # DS enable notifies

    [...]

    To enable mydns logging in /var/log/messages edit /etc/init.d/mydns
    Set options='-v'
     
  10. rukus77

    rukus77 Member

    Hello DFen,

    thanks for the detailed response as it reassures me that I did nothing wrong with install steps.

    I had followed your first post and updated the path in /etc/init.d/mydns since after compiled, it was installed in usr/local/sbin

    question, am I supposed to get a confirmation when starting, stopping or restarting? (i.e. etc/init.d/mydns restart)

    I ask because when I run these commands nothing happens, I'm just taken to a new line.

    Thanks again,
    Mike
     
  11. rukus77

    rukus77 Member

    Hello DFen,

    Here is what mydns looks like in /etc/init.d

    Do you see anything out of the ordinary?

    #!/bin/bash
    #
    # mydns This starts and stops mydns.
    #
    # chkconfig: 345 65 50
    # description: A database-driven DNS server
    #
    # processname: /usr/local/sbin/mydns
    # config: /etc/mydns.conf
    # pidfile: /var/run/mydns.pid

    #PATH=/sbin:/bin:/usr/bin:/usr/sbin
    PATH=/usr/local/sbin:/sbin:/bin:/usr/bin:/usr/sbin
    mypath=/usr/local/sbin
    prog=mydns
    myprog=$mypath/$prog

    # Source function library.
    . /etc/init.d/functions

    [ -f /usr/sbin/mydns ] || exit 1
    [ -f /etc/mydns.conf ] || exit 1

    RETVAL=0

    start(){
    echo -n $"Starting $prog: "

    daemon $myprog -b
    RETVAL=$?
    echo
    touch /var/lock/subsys/mydns
    return $RETVAL
    }

    stop(){
    echo -n $"Stopping $prog: "
    killproc $myprog
    RETVAL=$?
    echo
    rm -f /var/lock/subsys/mydns
    return $RETVAL

    }

    restart(){
    stop
    start
    }

    condrestart(){
    [ -e /var/lock/subsys/mydns ] && restart
    return 0
    }


    # See how we were called.
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    status)
    status $prog
    ;;
    restart|reload)
    restart
    ;;
    condrestart)
    condrestart
    ;;
    *)
    echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
    RETVAL=1
    esac

    exit $RETVAL

    Thanks,
    Mike
     
  12. rukus77

    rukus77 Member

    I just noticed where I went wrong. Looks like I missed updating the path on this line.

    Thanks for your assistance,

    Mike
     
  13. idsinc

    idsinc New Member

    Falko's code/script?: http://www.howtoforge.com/forums/showthread.php?t=37020

    Also, I have the same question as the last poster :
    (1)What specifically is missing in the code for 'updating the path on this line'?
    (2) I'm pretty new at all this scripting, so when you say "edit /etc/init.d/mydns, is that the same as saying edit /etc/init.d/mydns.conf?"

    Thanx in advance ;)
     
  14. falko

    falko Super Moderator Howtoforge Staff

    No, /etc/init.d/mydns is the start/stop/restart script for MyDNS, whereas mydns.conf (which is located in /etc, not /etc/init.d) is the configuration script for MyDNS.
     

Share This Page