Link to home
Start Free TrialLog in
Avatar of GCI_SUPPORT
GCI_SUPPORT

asked on

dns zone transfert

i have two bind server, but the slave cannot get the config form the master

master config
zone "rentsellbuy.com" {
      type master;
      file "/var/lib/bind/rentsellbuy.com.hosts";
      allow-transfer {
            192.168.1.9;
            };
      also-notify {
            192.168.1.9;
            };
      notify yes;
      };

slave config

zone "rentsellbuy.com" {
      type slave;
      masters {
            192.168.1.8;
            };
      file "/var/lib/bind/rentsellbuy.com.hosts";
      allow-update {
            192.168.1.8;
            };
      };

why it doesnt work?
Avatar of LinuxNinja
LinuxNinja
Flag of United States of America image

My first thought would be to check the ownership/permissions on the /var/lib/bind/rentsellbuy.com.hosts file on the slave. Be sure the UID of the BIND process has rights to write to this file.
To help diagnose the problem try
dig axfr rentsellbuy.com @192.168.1.8
Do that from 192.168.1.9 to check if the server is actually allowing the transfer.
If it is then you know to focus your troubleshooting on 192.168.1.9.

Let us know what happens.
Avatar of GCI_SUPPORT
GCI_SUPPORT

ASKER

the dig return all the record in the dns with no error
here what i get for a specific domain
Testing transfer of slave zone from 192.168.1.8 ..
.. from 192.168.1.8 : Failed : ; <<>> DiG 9.7.3 <<>> IN AXFR gcilogistic.net @192.168.1.8 ;; global options: +cmd ; Transfer failed.
ok everything is fixed exept one

i get this error on the apply zone

NDC command failed : WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration file (/etc/bind/rndc.conf) rndc: 'reload' failed: bad zone
What exactly did you type to get that last error?
i did the apply zone in webmin
I'm not familiar with webmin, do you see any errors in the messages file (or custom BIND logs) from running that command?  What happens when you restart BIND?  Do you have rndc.key and the config options in named.conf AND in /etc/bind/ ?  What does the command 'rndc status' give back?
im not familiar to with manual command, it just start to learn linux
so can you help me about what to type

thanks
First just type the following
rndc status

Open in new window


Pasting your named.conf and any files that may be included is always a good thing to do to help us find the correct answers to your questions.
WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration f                                                        ile (/etc/bind/rndc.conf)
version: 9.7.3
CPUs found: 1
The program 'worker' is currently not installed.  You can install it by typing:
apt-get install worker
root@ubuntudns1:~# number of zones: 25
worker threads: 1
number of zones: 25
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
here the named.conf

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
key rndc-key {
      algorithm hmac-md5;
      secret "W6hWYcEuqpoWMUsM4rIKbQ==";
      };
controls {
      inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; };
      };
server 192.168.1.9 {
      };
ASKER CERTIFIED SOLUTION
Avatar of Papertrip
Papertrip
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i did what you said and i got this error message

NDC command failed : rndc: neither /etc/bind/rndc.conf nor /etc/bind/rndc.key was found
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if i do that, when i start bind it fail
there is log somewhere
found the error have to remove keys { rndc-key; };


controls {
      inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; };
      };

but now i get this error

NDC command failed : WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration file (/etc/bind/rndc.conf) rndc: connection to remote host closed This may indicate that * the remote server is using an older version of the command protocol, * this host is not authorized to connect, * the clocks are not synchronized, or * the key is invalid.
ok some modification has been made

now i got this message
NDC command failed : rndc: connect failed: 127.0.0.1#953: connection refused
ok this also has been fix but now when i do named check conf

/var/lib/bind/rentsellbuy.com.hosts:3: ignoring out-of-zone data (192.168.1.8)
/var/lib/bind/gcilogistics.net.hosts:3: ignoring out-of-zone data (ns1.gcilogistic.com)
/var/lib/bind/gcilogistics.net.hosts:4: ignoring out-of-zone data (ns2.gcilogistic.com)
/var/lib/bind/goudreau-cargo.com.hosts:3: ignoring out-of-zone data (ns1.gcilogistic.com)
/var/lib/bind/goudreau-cargo.com.hosts:4: ignoring out-of-zone data (ns2.gcilogistic.com)
/var/lib/bind/gcilogistic.net.hosts:3: ignoring out-of-zone data (ns1.gcilogistic.com)
/var/lib/bind/gcilogistic.net.hosts:4: ignoring out-of-zone data (ns2.gcilogistic.com)
/var/lib/bind/gcilogistique.com.hosts:3: ignoring out-of-zone data (ns1.gcilogistic.com)
/var/lib/bind/gcilogistique.com.hosts:4: ignoring out-of-zone data (ns2.gcilogistic.com)
/var/lib/bind/infosb.ca.hosts:19: ignoring out-of-zone data (ns1.gcilogistic.com)
/var/lib/bind/infosb.ca.hosts:20: ignoring out-of-zone data (ns2.gcilogistic.com)
/var/lib/bind/gcilogistic.com.hosts:15: html_webservice.gcilogistic.com: bad owner name (check-names)
zone gcilogistic.com/IN: loading from master file /var/lib/bind/gcilogistic.com.hosts failed: bad owner name (check-names)
zone gcilogistic.com/IN: not loaded due to errors.
_default/gcilogistic.com/IN: bad owner name (check-names)
ok forget about my question, everything has been solved

the reason is inside my gcilogistic.com i had a A record with a underscore

removing that has corrected the problem