This is a discussion on How to update DNS through DHCP automatically within the Shell scripting forums, part of the Development/Scripting category; Hello friends, I am trying to Update DNS automatically when DHCP server leases any new address , but I am ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hello friends,
I am trying to Update DNS automatically when DHCP server leases any new address , but I am not getting it done. I would like to know the procedure. |
| Sponsored Links | ||
|
|
|
||||
|
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 |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Update Password File | amsreeku | Linux software | 2 | 03-02-2008 08:02 PM |
| single DHCP server with multiple VLAN's | frank | Computer Networking and Internet/broadband | 2 | 12-07-2007 01:38 PM |
| connecting to a DHCP network | ricc | Linux software | 2 | 04-24-2006 01:46 PM |
| DHCP server | aindusekhar | Linux software | 1 | 09-13-2005 07:29 PM |
| Dynamic DNS , should get updates automatically from DHCP | sonaikar | Linux software | 1 | 03-28-2005 01:14 PM |