LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-09-2012, 02:36 PM   #1
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
DDNS on Centos


i'm trying to configure ddns on centos, but it doesn't work.
i have a machine named centos.domain.com that i've installed dhcp and bind on it.also i have two other machine, centos2.domain.org and bt.domain.org.

here's my configuration files :
/etc/dhcpd.conf:
Code:
ddns-update-style interim;
ignore client-updates;
ddns-domainname "domain.org";
include "/etc/rndc.key";
zone domain.org. {
primary 127.0.0.1;
key rndckey;
}

subnet 10.1.1.0 netmask 255.255.255.0 {

# --- default gateway
	option routers			10.1.1.10;
	option subnet-mask		255.255.255.0;

#	option nis-domain		"domain.org";
	option domain-name		"domain.org";
	option domain-name-servers	10.1.1.10;

	option time-offset		-18000;	# Eastern Standard Time
#	option ntp-servers		192.168.1.1;
#	option netbios-name-servers	192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#	option netbios-node-type 2;

	range dynamic-bootp  10.1.1.12 10.1.1.16;
	default-lease-time 21600;
	max-lease-time 43200;

	host bt {
	hardware ethernet 00:0c:29:a9:cd:96;
	fixed-address 10.1.1.13;
	}

}
/etc/named.conf :
Code:
// Red Hat BIND Configuration Tool
// 
// Default initial "Caching Only" name server configuration
//

options {
	directory "/var/named";
	dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
	/*
	 * If there is a firewall between you and nameservers you want
	 * to talk to, you might need to uncomment the query-source
	 * directive below.  Previous versions of BIND always asked
	 * questions using port 53, but BIND 8.1 uses an unprivileged
	 * port by default.
	 */
	 // query-source address * port 53;
};

zone "." IN {
	type hint;
	file "named.root";
};

zone "localdomain." IN {
	type master;
	file "localdomain.zone";
	allow-update { none; };
};

zone "localhost." IN {
	type master;
	file "localhost.zone";
	allow-update { none; };
};

zone "0.0.127.in-addr.arpa." IN {
	type master;
	file "named.local";
	allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." IN {
        type master;
	file "named.ip6.local";
	allow-update { none; };
};

zone "255.in-addr.arpa." IN {
	type master;
	file "named.broadcast";
	allow-update { none; };
};

zone "0.in-addr.arpa." IN {
	type master;
	file "named.zero";
	allow-update { none; };
};

zone "domain.org" {
type master ;
file "db.domain.org";
allow-update {key "rndckey";};
notify yes;
};

include "/etc/rndc.key";
what's wrong, guys ?
 
Old 02-09-2012, 03:40 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Quote:
ignore client-updates
.. this might be a problem for a start, have you read 'man 5 dhcpd.conf'?
 
Old 02-09-2012, 03:59 PM   #3
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
i'm configuring it based on this page:
http://www.techienote.com/2010/06/dy...on-centos.html
 
Old 02-10-2012, 12:52 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
It won't affect the registration unless the host belongs to a different domain than that hosted by the dns server... there should be something in the logs .. ?
 
Old 02-10-2012, 01:12 AM   #5
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
when i issue tail -f /var/log/messages i don't see nothing but this :
Code:
Feb 10 10:40:17 centos dhcpd: Dynamic and static leases present for 10.1.1.13.
Feb 10 10:40:17 centos dhcpd: Remove host declaration bt or remove 10.1.1.13
Feb 10 10:40:17 centos dhcpd: from the dynamic address pool for 10.1.1/24
Feb 10 10:40:17 centos dhcpd: DHCPREQUEST for 10.1.1.13 from 00:0c:29:a9:cd:96 via eth1
Feb 10 10:40:17 centos dhcpd: DHCPACK on 10.1.1.13 to 00:0c:29:a9:cd:96 via eth1
looks like ddns is not enable or something !
 
Old 02-10-2012, 02:44 AM   #6
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
also i'm getting this error
Code:
 grep named /var/log/messages
Feb 10 12:10:11 centos named[12371]: client 10.1.1.10#44061: updating zone 'domain.org/IN': update unsuccessful: bt.domain.org: 'name not in use' prerequisite not satisfied (YXDOMAIN)
Feb 10 12:13:03 centos named[12744]: client 10.1.1.10#55044: updating zone 'domain.org/IN': update unsuccessful: bt.domain.org/TXT: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
 
Old 02-10-2012, 05:25 AM   #7
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
i solved the problem.apparently when you register a record in named, manually, you can't update it with ddns.so i deleted the entries from zone database(in my case /var/named/db.domain.org) and now dhcp can update dns records.
but i have a question.when the client's record is updated, i can't see the entry in my zone for like a quit time.it seems there is a file with jnl extention in /var/named with same name as my zone database.what's the role of this file ?
 
Old 02-11-2012, 02:34 AM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
That would be a journal .. see: http://www.zytrax.com/books/dns/ch7/xfer.html
 
Old 02-11-2012, 02:48 AM   #9
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
thank you kbp.but i didn't undrestand the role of jornal file ?!?!
 
Old 02-11-2012, 06:00 AM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Quote:
Journal files are used by Dynamic DNS (DDNS) when modifying the master and when receiving IXFR changes on slave zones. The journal file is in binary format and its name is formed by appending the extension .jnl to the name of the corresponding zone file.

All changes made to a zone using dynamic update are written to the zone's journal file. The server will periodically flush the complete contents of the updated zone to its zone file this happens approximately every 15 minutes. When a server is restarted after a shutdown or crash, it will replay the journal file to incorporate into the zone any updates that took place after the last zone file update.
.. is this explanation ok ?
 
1 members found this post helpful.
Old 02-11-2012, 06:36 AM   #11
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Original Poster
Rep: Reputation: 10
thank you so much
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH and DDNS michael.guerrero Linux - Server 2 10-24-2009 10:44 AM
CentOS 5.2 Bind 9 ddns configuration errors chackercon Linux - Networking 2 01-28-2009 04:03 PM
ddns and dhcpd sportf Linux - Networking 1 03-20-2007 09:26 PM
Ddns hiieu Debian 3 11-10-2006 02:39 PM
DHCP and DDNS garullon245136 Linux - Networking 1 06-20-2005 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration