View Single Post

  #2 (permalink)  
Old 03-16-2005, 07:42 PM
monk's Avatar
monk monk is offline
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

Do you want perl/shell script or what? as you posted it in Shell scripting forum...
If you are looking for configuration then you need it as follows:

Let us say domain is test.com

Domain nameserver, dns (named), samba and most of Linux services servers ip is 192.168.0.1

And network is 192.168.0.1/24 for dhcp ips are 192.168.0.10-60

Your dhcpd.conf should be as follows (use DHCP Server version 3 or above)
Code:
ddns-updates on;
ddns-domainname "test.com";
option ntp-servers 192.168.0.1;
ddns-update-style ad-hoc;
allow unknown-clients;
default-lease-time 86400;
max-lease-time 172800;

option domain-name "test.com";
option domain-name-servers 192.168.0.1;
option netbios-name-servers 192.168.0.1;
option netbios-dd-server 192.168.0.1;
option netbios-node-type 8;

subnet 192.168.0.1 netmask 255.255.255.0 {
	range dynamic-bootp 192.168.0.10 192.168.0.60;
	option subnet-mask 255.255.255.0;
	option routers 192.168.0.220;
	allow unknown-clients;
}

In your named.conf file it should be as follows:
Code:
acl lan {
	192.168.0.1/24;
	127.0.0.1;
};

options {

	directory "/var/named";
	listen-on-v6 { any; };
	notify no;
	forward first;
	forwarders {
		192.168.0.254;
		};
	auth-nxdomain yes;
	multiple-cnames yes;
	listen-on {
		lan;
		};
};

zone "test.com" {
	type master;
	file "/var/named/test.com.zone";
	allow-query {
		lan;
		};
	allow-transfer {
		lan;
		};
	allow-update {
		lan;
		};
	};

zone "0.168.192.in-addr.arpa" {
	type master;
	file "/var/named/192.168.0.rev.zone";
	allow-query {
		lan;
	};
	allow-transfer {
		lan;
	};
	allow-update {
		lan;
	};
};

Now restart the both and see if it works or not... also visit http://ops.ietf.org/dns/dynupd/secure-ddns-howto.html
http://www.wlug.org.nz/DHCPNotes

Hope this helps
Reply With Quote