Linux中自动更新DNS记录

由 hongfeng 在 08-13-2004 15:16 发表:

Linux中自动更新DNS记录

关于使用DHCP的客户端如何自动更新DNS记录我在2月以前试验成功了,我把相关的配置文件的内容贴出来:结果绝对成功.

平台redhat9

注:在Windows作客户端是dhcp.conf和named.conf的配置不会有问题,但是如果是Linux做客户端就需要我文档中说的那样做才可以的。

我只是把我原来的配置文件中的域名替换成test了......

Named.conf

options {

directory "/var/named";

};

controls {

inet 127.0.0.1 allow { localhost; } keys { rndckey; };

};

zone "." IN {

type hint;

file "named.ca";

};

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; };

};

include "/etc/rndc.key";

test.com

acl local_game_name {

192.168.201.0/24;

};

zone "test.com" in {

type master;

file "/var/named/test_com_db";

allow-update { local_game_name; };

};

zone "201.168.192.in-addr.arpa" in {

type master;

file "/var/named/test.com.rev201";

allow-update { local_game_name; };

};

;

; file: test_com_db

;

$ORIGIN test.com.

$TTL 14400

@ IN SOA wbw.test.com. root.wbw.test.com. (

2004060301;

3H ;

2H ;

4W ;

3D ) ;

IN NS wbw.test.com.

wbw.test.com. IN A 192.168.201.180

; file: test.com.rev201

;

$ORIGIN 201.168.192.in-addr.arpa.

$TTL 14400

@ IN SOA wbw.test.com. root.wbw.test.com. (

2004060301;

3H ;

2H ;

4W ;

3D ) ;

IN NS wbw.test.com.

180 IN PTR wbw.test.com.

DHCP.conf

ddns-update-style interim;

ddns-updates on;

allow client-updates;

ddns-domainname "test.com";

ddns-rev-domainname "in-addr.arpa";

#ddns-hostname "test.com";

subnet 192.168.201.0 netmask 255.255.255.0 {

--- default gateway

option routers 192.168.201.1;

option subnet-mask 255.255.255.0;

option domain-name "test.com";

option domain-name-servers 192.168.201.180;

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 192.168.201.200 192.168.201.254;

default-lease-time 21600;

max-lease-time

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus