HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   DNS Zone Transfer Problem (http://www.howtoforge.com/forums/showthread.php?t=37409)

centosarus 13th July 2009 23:27

DNS Zone Transfer Problem
 
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/sho...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.

centosarus 14th July 2009 03:38

Wrong Forum
 
That was for ISPConfig 3. Sorry

falko 14th July 2009 14:16

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

centosarus 15th July 2009 02:45

Double Threads
 
1 Attachment(s)
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:
Quote:

Can you set allow-update and notify-enabled to yes and restart MyDNS?
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

till 15th July 2009 09:46

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

centosarus 15th July 2009 18:39

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: REFUSED, 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
; Transfer failed.
[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
; Transfer failed.
[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.

centosarus 16th July 2009 18:48

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.

till 16th July 2009 18:57

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.

centosarus 16th July 2009 19:15

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.

centosarus 17th July 2009 03:44

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.


All times are GMT +2. The time now is 20:50.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.