DNS Zone Transfer Problem

Discussion in 'Installation/Configuration' started by centosarus, Jul 13, 2009.

  1. centosarus

    centosarus New Member

    I have come across a couple of threads where people had issues with zone transfers and they're here:
    http://www.howtoforge.com/forums/showthread.php?t=34373
    http://www.howtoforge.com/forums/showthread.php?t=32145&page=2

    I am running Centos 5.3.

    I went over these threads and did everything that was suggested: I upgraded to mydns-ng latest (1.2.8.27) and my zones are still not being transferred to the slave server.

    Master:

    Code:
    [root@vnpws01 log]# mydns -v
    mydns[10804]: AXFR is enabled
    mydns[10804]: TCP ports are enabled
    mydns[10804]: DNS UPDATE is not enabled
    mydns[10804]: DNS NOTIFY is not enabled
    mydns[10804]: DNS IXFR is not enabled
    mydns[10804]: optional 'xfer' column found in 'dns_soa' table
    mydns[10804]: mydns 1.2.8.27 started Mon Jul 13 16:19:48 2009 (listening on 3 addresses)
    Slave:

    Code:
    [root@vnpws02 tmp]# mydns -v
    mydns[10994]: AXFR is enabled
    mydns[10994]: TCP ports are enabled
    mydns[10994]: DNS UPDATE is not enabled
    mydns[10994]: DNS NOTIFY is not enabled
    mydns[10994]: DNS IXFR is not enabled
    mydns[10994]: optional 'xfer' column found in 'dns_soa' table
    mydns[10994]: mydns 1.2.8.27 started Mon Jul 13 16:18:39 2009 (listening on 3 addresses)
    Contents of mydns.conf on both servers:

    Code:
    ##
    ##  /etc/mydns.conf
    ##  Fri Sep 21 21:44:51 2007
    ##  For more information, see mydns.conf(5).
    ##
    
    
                                    # DATABASE INFORMATION
    
    db-host = localhost             # SQL server hostname
    db-user = ispconfig             # SQL server username
    db-password = xxxxxxxxxxxx # SQL server password
    database = dbispconfig                  # MyDNS database name
    
    
                                    # GENERAL OPTIONS
    
    user = nobody                   # Run with the permissions of this user
    group = nobody                  # Run with the permissions of this group
    listen = *                      # Listen on these addresses ('*' for all)
    no-listen =                     # Do not listen on these addresses
    
    
                                    # CACHE OPTIONS
    
    zone-cache-size = 1024          # Maximum number of elements stored in the zone cache
    zone-cache-expire = 60          # Number of seconds after which cached zones expires
    reply-cache-size = 1024         # Maximum number of elements stored in the reply cache
    reply-cache-expire = 30         # Number of seconds after which cached replies expire
    
    
                                    # 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?
    ignore-minimum = no             # Ignore minimum TTL for zone?
    soa-table = dns_soa                     # Name of table containing SOA records
    rr-table = dns_rr                       # Name of table containing RR data
    notify-enabled = no             # Enable notify from updates
    notify-source = 0.0.0.0         # Source address for ipv4 notify messages
    notify-source6 = 0.0.0.0        # Source address for ipv6 notify messages
    soa-where =                     # Extra WHERE clause for SOA queries
    rr-where =                      # Extra WHERE clause for RR queries
    The mydns --create-tables command yields:

    Code:
    [root@vnpws01 log]# /usr/sbin/mydns --create-tables
    --
    --  Table layouts for mydns 1.2.8.27 (Jul 2009)
    --  Copyright (C) 2002-2005 Don Moore  2007-2008 Howard Wilkinson
    --
    --  You might create these tables with a command like:
    --
    --    $ mydns --create-tables | mysql -hHOST -p -uUSER DATABASE
    --
    --
    
    --
    --  Table structure for table 'dns_soa' (zones of authority)
    --
    CREATE TABLE IF NOT EXISTS dns_soa (
      id         INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
      origin     CHAR(255) NOT NULL,
      ns         CHAR(255) NOT NULL,
      mbox       CHAR(255) NOT NULL,
      serial     INT UNSIGNED NOT NULL default '1',
      refresh    INT UNSIGNED NOT NULL default '28800',
      retry      INT UNSIGNED NOT NULL default '7200',
      expire     INT UNSIGNED NOT NULL default '604800',
      minimum    INT UNSIGNED NOT NULL default '86400',
      ttl        INT UNSIGNED NOT NULL default '86400',
       xfer      CHAR(255) DEFAULT NULL,
      UNIQUE KEY (origin)
    ) Engine=MyISAM;
    
    --
    --  Table structure for table 'dns_rr' (resource records)
    --
    CREATE TABLE IF NOT EXISTS dns_rr (
      id         INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
      zone       INT UNSIGNED NOT NULL,
      name       CHAR(64) NOT NULL,
      data       VARBINARY(128) NOT NULL,
      aux        INT UNSIGNED NOT NULL,
      ttl        INT UNSIGNED NOT NULL default '86400',
      type       ENUM('A','AAAA','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT'),
      UNIQUE KEY rr (zone,name,type,data)
    ) Engine=MyISAM;
    
    [root@vnpws01 log]#
    Please help in any way.

    Thanks.
     
  2. centosarus

    centosarus New Member

    Wrong Forum

    That was for ISPConfig 3. Sorry
     
  3. falko

    falko Super Moderator Howtoforge Staff

    Can you set allow-update and notify-enabled to yes and restart MyDNS?
     
  4. centosarus

    centosarus New Member

    Double Threads

    Falko,

    Is there a way to remove one of these two threads:
    http://www.howtoforge.com/forums/showthread.php?t=37416
    or
    http://www.howtoforge.com/forums/showthread.php?t=37409

    They were both opened by me and they're the same topic. I had created one accidentally in the ISPConfig2 section. Realizing my mistake, I had copied it over to the ISPConfig 3 section. Now they're both in the ISPConfig 3.

    Now:
    I did that and no zone transfers yet.
    The slave IP is included in the master's zone as seen in the attached picture.
    Also, please be aware I am using a multi server setup where ISPConfig 3 is administering (currently) 2 servers.

    Is the zone transfer automatic (as with bind) or do I need to initiate it with mydnsimport?

    Thanks
     

    Attached Files:

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to restart mydns. You can also test zone transports with the dig command.
     
  6. centosarus

    centosarus New Member

    I have restarted mydns a few times. I have been running all kinds of dig commands.
    Master: vnpws01 192.168.1.122
    Slave: vnpws02 192.168.1.123

    DIG with type ANY:


    Code:
    [root@vnpws01 ~]# dig @192.168.1.122 any mydomain.com
    
    ; <<>> DiG 9.3.4-P1 <<>> @192.168.1.122 any mydomain.com
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54126
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 3
    
    ;; QUESTION SECTION:
    ;mydomain.com.                  IN      ANY
    
    ;; ANSWER SECTION:
    mydomain.com.           86400   IN      SOA     ns1.mydomain.com. jpalex.mydomain.com. 2009071402 28800 7200 604800 86400
    mydomain.com.           86400   IN      A       192.168.1.122
    mydomain.com.           86400   IN      MX      10 mail.mydomain.com.
    mydomain.com.           86400   IN      NS      ns1.mydomain.com.
    mydomain.com.           86400   IN      NS      ns2.mydomain.com.
    
    ;; ADDITIONAL SECTION:
    mail.mydomain.com.      86400   IN      A       192.168.1.122
    ns1.mydomain.com.       86400   IN      A       192.168.1.122
    ns2.mydomain.com.       86400   IN      A       192.168.1.123
    
    ;; Query time: 6 msec
    ;; SERVER: 192.168.1.122#53(192.168.1.122)
    ;; WHEN: Wed Jul 15 11:30:10 2009
    ;; MSG SIZE  rcvd: 222
    Code:
    [root@vnpws01 ~]# dig @192.168.1.123 any mydomain.com
    
    ; <<>> DiG 9.3.4-P1 <<>> @192.168.1.123 any mydomain.com
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: [B]REFUSED[/B], id: 50922
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;mydomain.com.                  IN      ANY
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.1.123#53(192.168.1.123)
    ;; WHEN: Wed Jul 15 11:31:23 2009
    ;; MSG SIZE  rcvd: 30
    
    [root@vnpws01 ~]#
    DIG with type AXFR:

    Code:
    [root@vnpws01 ~]# dig @192.168.1.123 axfr mydomain.com
    
    ; <<>> DiG 9.3.4-P1 <<>> @192.168.1.123 axfr mydomain.com
    ; (1 server found)
    ;; global options:  printcmd
    ; [B]Transfer failed[/B].
    [root@vnpws01 ~]#
    Code:
    [root@vnpws01 ~]# dig @192.168.1.122 axfr mydomain.com
    
    ; <<>> DiG 9.3.4-P1 <<>> @192.168.1.122 axfr mydomain.com
    ; (1 server found)
    ;; global options:  printcmd
    ; [B]Transfer failed[/B].
    [root@vnpws01 ~]#
    
    I am using a multi server setup. I was hoping that some folks who have successfully set this up can help out.

    Thanks.
     
  7. centosarus

    centosarus New Member

    Is Zone Transfer possible between two MyDNS Servers, because that's what I am running. Or is it just between a MyDNS server and a bind server?

    I have done everything possible, and so far I can't get that zone transfer to take place between the MyDNS servers.

    I am still hoping someone can help.

    Thanks.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Zone transfers are only between a mydns master server and a bind slave. Between mydns servers you dont use any zone transfers as they are able to use the same or a replicated mysql database.
     
  9. centosarus

    centosarus New Member

    Thanks a lot. That's what I kind of figured out from reading the docs on MyDNS. I was trying to zone transfer between 2 MyDNS servers.

    I do have a 2 server setup using one ISPConfig3 interface. Isn't replication done by ISPConfig in a setup like that? I was hoping to see the Database on the slave updated as I create zones on the master, but that hasn't happened. I do know that my databases setup are OK since when I create sites on the master, they get updated on the slave.

    Could it be that I am missing something?

    Thanks as always.
     
  10. centosarus

    centosarus New Member

    Solved

    With the help of one of the forum users, (I am not sure if he wants his name mentioned), I used mk-table-sync (http://www.maatkit.org/doc/mk-table-sync.html) to sync both the dns_soa and the dns_rr tables across both servers. I got the result I was looking for.

    Thanks.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    No, ispconfig is not replicating. ISPConfig is made to configure indivifual servers. Mirroring will be implemented in one of the next releases.

    By the way, if you would have asked just how to replicate records between two mydns servers instead of asking why zone transfers ( which is a bind specific technique to connect mydns and bind) is not working, we would have been able to solve this thread faster ;)
     
  12. centosarus

    centosarus New Member

    My mistake. I thought MyDNS did exactly what bind did except that it uses a database. So, I mistakenly thought since u could do zone transfers between 2 bind servers, one could do zone transfers between 2 MyDNS servers. I learned something new.

    I apologize for not stating clearly what I was looking for.

    Thanks as always.
     

Share This Page