[金典问题]配置的DNS服务器出错了,

由 nbslr 在 04-07-2004 09:50 发表:

[金典问题]配置的DNS服务器出错了,

我是用在机房的,局域网网段192.168.0.0/24,外部网卡地址是10.56.21.177

DNS是10.56.20.12 内网DNS服务器地址是192.168.0.2

局域网中我的域名是langzi.com,主机名redhat

我的 配置是这样的,我把所有的文件和错误信息写出来

1.resolv.conf

----------------------------------------------------------------------------

nameserver 192.168.0.2

domain langzi.com

search langzi.com

-----------------------------------------------------------------------------

2.hosts

-----------------------------------------------------------------------------

192.168.0.2 redhat.langzi.com redhat

------------------------------------------------------------------------------

3.host.conf

-----------------------------------------------------------------------------

order bind hosts

------------------------------------------------------------------------------

4.name.conf

-----------------------------------------------------------------------------

options {

directory "/var/named";

forwarders{10.56.20.12;};

};

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 "0.0.127.zone";

allow-update { none; };

};

zone "lagnzi.com" IN {

type master;

file "langzi.com.zone";

allow-update { none;};

};

zone "0.168.192.in-addr.arpa" IN{

type master;

file "0.168.192.zone";

allow-update { none;};

};

-------------------------------------------------------------------------------

5.0.0.127.zone

--------------------------------------------------------------------------------

$TTL 86400

@ IN SOA localhost. root.lcoalhost. (

2002120601 ; serial

28800 ; refresh

7200 ; retry

604800 ; expire

86400 ; ttk

)

IN NS localhost.

1 IN PTR localhost.

------------------------------------------------------------------------------------

6.localhost.zone

------------------------------------------------------------------------------------

$TTL 86400

$ORIGIN localhost.

@ IN SOA localhost. root.localhost. (

2002120601 ; serial

28800 ; refresh

7200 ; retry

604800 ; expire

86400 ; ttl

)

IN NS localhost.

localhost. IN A 127.0.0.1

-------------------------------------------------------------------------------

7.0.168.192.zone

--------------------------------------------------------------------------------

$TTL 86400

@ IN SOA redhat.langzi.com. root.redhat.langzi.com. (

2002120601

28800

7200

604800

86400 )

IN NS redhat.langzi.com.

2 IN PTR redhat.langzi.com.

---------------------------------------------------------------------------------

8.langzi.com.zone

--------------------------------------------------------------------------------

$TTL 86400

@ IN SOA redhat.langzi.com. langzi.com. (

2002103000 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

86400 ) ; Minimum

IN NS redhat.langzi.com.

redhat IN A 192.168.0.2

---------------------------------------------------------------------------------

message 信息

------------------------------------------------------------------------------------

Apr 2 12:01:48 redhat named[2738]: starting BIND 9.2.1 -u named

Apr 2 12:01:48 redhat named[2738]: using 1 CPU

Apr 2 12:01:48 redhat named[2738]: loading configuration from '/etc/named.conf'

Apr 2 12:01:48 redhat 4月 2 12:01:48 named: named startup succeeded

Apr 2 12:01:48 redhat named[2738]: no IPv6 interfaces found

Apr 2 12:01:48 redhat named[2738]: listening on IPv4 interface lo, 127.0.0.1#53

Apr 2 12:01:48 redhat named[2738]: listening on IPv4 interface eth0, 192.168.0.2#53

Apr 2 12:01:48 redhat named[2738]: listening on IPv4 interface eth1, 10.56.21.178#53

Apr 2 12:01:48 redhat named[2738]: command channel listening on 127.0.0.1#953

Apr 2 12:01:49 redhat named[2738]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2002120601

Apr 2 12:01:49 redhat named[2738]: dns_master_load: 192.168.0.2.zone:3: unexpected end of line

Apr 2 12:01:49 redhat named[2738]: dns_master_load: 192.168.0.2.zone:2: unexpected end of input

Apr 2 12:01:49 redhat named[2738]: zone 0.168.192.in-addr.arpa/IN: loading master file 192.168.0.2.zone: unexpected end of input

Apr 2 12:01:49 redhat named[2738]: dns_master_load: langzi.com.zone:3: unexpected end of line

Apr 2 12:01:49 redhat named[2738]: dns_master_load: langzi.com.zone:2: unexpected end of input

Apr 2 12:01:49 redhat named[2738]: zone lagnzi.com/IN: loading master file langzi.com.zone: unexpected end of input

Apr 2 12:01:49 redhat named[2738]: zone localhost/IN: loaded serial 2002120601

Apr 2 12:01:49 redhat named[2738]: running

------------------------------------------------------------------------------

能进行dns转发


由 Snoopy 在 04-07-2004 10:51 发表:


兄弟你发了那么多贴,都还没得到解决 ?

这样吧,你先找个正确的dns配置文件覆盖一下,再修改成你的域名,

有些错误可能你一时看不出来


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 faint 在 04-07-2004 10:54 发表:


你的是redhat系统?


由 Snoopy 在 04-07-2004 11:26 发表:


我的给你参考一下!

/etc/named.conf

// generated by named-bootconf.pl

options {

directory "/var/named";

forwarders { 202.116.128.1; 192.168.100.1; };

notify yes;

/*

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

};

logging {

channel LAMER_log {

file "/var/log/dns/dns-lamer.log" versions 3 size 10m;

severity info;

print-severity yes; print-time yes;

};

channel SEC_log {

file "/var/log/dns/dns-sec.log" versions 3 size 10m;

severity info;

print-severity yes; print-time yes;

};

channel STAT_log {

file "/var/log/dns/dns-stat.log" versions 3 size 10m;

severity info;

print-severity yes; print-time yes;

};

category lame-servers { LAMER_log; };

category security { SEC_log; };

};

/* category cname { null; };

category statistics { STAT_log; };*/

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

};

zone "snoopy.gov" {

type master;

file "snoopy.gov";

allow-query { any; };

};

zone "b011306.com" {

type master;<br

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