LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Migrate/Copy DNS server to a new Centos Box (https://www.linuxquestions.org/questions/linux-server-73/migrate-copy-dns-server-to-a-new-centos-box-4175458292/)

nas123 04-16-2013 04:37 AM

Migrate/Copy DNS server to a new Centos Box
 
Hi Friends,

I have been running into some issues

Currently we have a internal DNS server which contains detail of local area machine - it has no issues and is working well.

it lives on a centos vm runnind bind-chroot

question.

i have created a new centos box and installed bind-chroot

i want to copy all settings from old server to this new server.

i was thinking of copying across all /var/named*

will this work?

thanks

regards,

Nas

TenTenths 04-16-2013 06:28 AM

Also check original /etc/named.conf to see if any other config files are referenced.

Habitual 04-16-2013 09:49 AM

Quote:

Originally Posted by nas123 (Post 4932294)
Hi Friends,

I have been running into some issues

Currently we have a internal DNS server which contains detail of local area machine - it has no issues and is working well.

it lives on a centos vm runnind bind-chroot

question.

i have created a new centos box and installed bind-chroot

i want to copy all settings from old server to this new server.

i was thinking of copying across all /var/named*

will this work?

thanks

regards,

Nas

I did exactly this but I used scp from old_dns to new_dns hosts and bounced named.
http://www.linuxquestions.org/questi...os-4175446650/

nas123 04-17-2013 08:11 AM

Hi sorry for the late reply:
so when you copied across your named directory did you encounter any issues?

regards

Habitual 04-17-2013 12:18 PM

0 issues AFAICT.

nas123 04-18-2013 09:45 AM

Hi,

just to clarfiy what do you mean by Bounced named??

also i am trying to use scp -ar /var/named/ ipaddress:/var/named

but it does not seem to be working correctly:

keep getting the following file being copied 100's of time over:

smp_affinity 100% 0 0.0KB/s 00:00
smp_affinity 100% 0 0.0KB/s 00:00
smp_affinity 100% 0 0.0KB/s 00:00

any ideas??

regards

Habitual 04-18-2013 12:12 PM

Quote:

Originally Posted by nas123 (Post 4934080)
Hi,

just to clarfiy what do you mean by Bounced named??

service named restart

and you are scp'ing incorrectly.

new host:
Code:

cd /var/named
scp user@Old_IP_Address:/var/named/* .


nas123 04-26-2013 04:38 AM

I have did the copy just getting the following error!!!


[root@host data]# service named start
Starting named:
Error in named configuration:
zone 0.0.127.in-addr.arpa/IN: loaded serial 11
zone test.test.com/IN: loaded serial **********
zone 100.100.10.in-addr.arpa/IN: NS 'ns.100.100.10.in-addr.arpa' has no address records (A or AAAA)
zone 100.100.10.in-addr.arpa/IN: not loaded due to errors.
_default/100.100.10.in-addr.arpa/IN: bad zone

any ideas?

chrism01 04-26-2013 04:49 AM

Yep, check the files mentioned :).

You can check syntax
Code:

service named configtest

bathory 04-26-2013 12:15 PM

Quote:

zone 100.100.10.in-addr.arpa/IN: NS 'ns.100.100.10.in-addr.arpa' has no address records (A or AAAA)
From the above looks like you miss the FQDN of the NS RR in the 100.100.10.in-addr.arpa zone file.
I guess it's something like:
Code:

      NS ns
instead of:
Code:

      NS ns.test.com.
So bind adds the zone name after the hostname, resulting in ns.100.100.10.in-addr.arpa, that of course is not valid and does not have an A (or AAAA) RR

Regards

nas123 04-29-2013 03:23 AM

Quote:

Originally Posted by bathory (Post 4939408)
From the above looks like you miss the FQDN of the NS RR in the 100.100.10.in-addr.arpa zone file.
I guess it's something like:
Code:

      NS ns
instead of:
Code:

      NS ns.test.com.
So bind adds the zone name after the hostname, resulting in ns.100.100.10.in-addr.arpa, that of course is not valid and does not have an A (or AAAA) RR

Regards


hi thanks for the reply.

i made the change and now i get no issues - but named service fails on start ???

regards.

bathory 04-29-2013 04:49 AM

Quote:

i made the change and now i get no issues - but named service fails on start ???
Any logs?

nas123 04-29-2013 05:49 AM

Apr 29 19:41:35 ns named[15312]: starting BIND 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 -u named -t /var/named/chroot
Apr 29 19:41:35 ns named[15312]: built with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libtool' '--localstatedir=/var' '--enable-threads' '--enable-ipv6' '--with-pic' '--disable-static' '--disable-openssl-version-check' '--with-dlz-ldap=yes' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-filesystem=yes' '--with-gssapi=yes' '--disable-isc-spnego' '--with-docbook-xsl=/usr/share/sgml/docbook/xsl-stylesheets' '--enable-fixed-rrset' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS= -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'CPPFLAGS= -DDIG_SIGCHASE'
Apr 29 19:41:35 ns named[15312]: ----------------------------------------------------
Apr 29 19:41:35 ns named[15312]: BIND 9 is maintained by Internet Systems Consortium,
Apr 29 19:41:35 ns named[15312]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Apr 29 19:41:35 ns named[15312]: corporation. Support and training for BIND 9 are
Apr 29 19:41:35 ns named[15312]: available at https://www.isc.org/support
Apr 29 19:41:35 ns named[15312]: ----------------------------------------------------
Apr 29 19:41:35 ns named[15312]: adjusted limit on open files from 4096 to 1048576
Apr 29 19:41:35 ns named[15312]: found 1 CPU, using 1 worker thread
Apr 29 19:41:35 ns named[15312]: using up to 4096 sockets
Apr 29 19:41:35 ns named[15312]: loading configuration from '/etc/named.conf'
Apr 29 19:41:35 ns named[15312]: using default UDP/IPv4 port range: [1024, 65535]
Apr 29 19:41:35 ns named[15312]: using default UDP/IPv6 port range: [1024, 65535]
Apr 29 19:41:35 ns named[15312]: listening on IPv4 interface lo, 127.0.0.1#53
Apr 29 19:41:35 ns named[15312]: listening on IPv4 interface eth0, 10.100.100.100#53
Apr 29 19:41:35 ns named[15312]: generating session key for dynamic DNS
Apr 29 19:41:35 ns named[15312]: sizing zone task pool based on 4 zones
Apr 29 19:41:35 ns named[15312]: could not configure root hints from '/var/named/named.root': permission denied
Apr 29 19:41:35 ns named[15312]: loading configuration: permission denied
Apr 29 19:41:35 ns named[15312]: exiting (due to fatal error)


sorry totally forgot to attach log.

regards

chrism01 04-29-2013 06:28 AM

Code:

Apr 29 19:41:35 ns named[15312]: could not configure root hints from '/var/named/named.root': permission denied
Apr 29 19:41:35 ns named[15312]: loading configuration: permission denied

So, look at ownerships/perms/SELinux to start with.

nas123 04-29-2013 07:20 AM

Quote:

Originally Posted by chrism01 (Post 4941057)
Code:

Apr 29 19:41:35 ns named[15312]: could not configure root hints from '/var/named/named.root': permission denied
Apr 29 19:41:35 ns named[15312]: loading configuration: permission denied

So, look at ownerships/perms/SELinux to start with.

Hi

well i have got selinux disabled.

and here is the output of directory

[root@]# pwd
/var/named/chroot/var/named
[root@]# ls -ll
total 40
drwxrwx---. 2 root root 4096 Apr 26 20:00 data
-rw-r-----. 1 root root 198 Apr 22 22:04 localdomain.zone
-rw-r-----. 1 root root 195 Apr 22 22:04 localhost.zone
-rw-r-----. 1 root root 427 Apr 22 22:04 named.broadcast
-rw-r-----. 1 root root 1892 Apr 22 22:04 named.ca
-rw-r-----. 1 root root 424 Apr 22 22:04 named.ip6.local
-rw-r-----. 1 root root 426 Apr 22 22:04 named.local
-rw-r-----. 1 root root 1892 Apr 22 22:04 named.root
-rw-r-----. 1 root root 427 Apr 22 22:04 named.zero
drwxrwx---. 2 root root 4096 Jul 27 2004 slaves
[root@ns named]#


All times are GMT -5. The time now is 05:52 PM.