http://linux.chinaunix.net/bbs/thread-1094816-1-1.html
我按照上面的文章搭建DNS,当我在虚拟机下作的时候是正确的,可以显示的服务器和IP的,当我在真实环境下作的时候,显示的却是错误的,
[root@rhel5 named]# nslookup
> [url]www.world7th.net[/url]
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: [url]www.world7th.net[/url]
Address: 218.83.175.155
> [url]www.world7th.org[/url]
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: [url]www.world7th.org[/url]
Address: 218.83.175.155
> [url]www.world7th.cn[/url]
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: [url]www.world7th.cn[/url]
Address: 159.226.7.162
> mail.world7th.net
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: mail.world7th.net
Address: 218.83.175.155
> mail.world7th.org
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: mail.world7th.org
Address: 218.83.175.155
> mail.world7th.cn
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: mail.world7th.cn
Address: 218.83.175.155
>
我也是第一次弄DNS,不知道是啥原因,我把我的配置文件铁出来,大家给个建议吧,配置文件我和虚拟机下的都是按照上面的网址的文字搭建的,却欻现不一样的问题,实在有点郁闷,我把配置文件铁出来
gedit world7th.cn.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS world7th.cn
IN MX 10 mail.world7th.cn
www IN A 192.168.1.185
mail IN A 192.168.1.186
localhost IN A 127.0.0.1
gedit world7th.net.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS world7th.net
IN MX 10 mail.world7th.net
www IN A 192.168.1.181
mail IN A 192.168.1.182
localhost IN A 127.0.0.1
gedit world7th.org.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS world7th.org
IN MX 10 mail.world7th.org
www IN A 192.168.1.183
mail IN A 192.168.1.184
localhost IN A 127.0.0.1
上面三个都是一个类型的
gedit 1.168.192.in-addr.local
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS world7th.net.
IN NS world7th.org.
IN NS world7th.cn.
181 IN PTR [url]www.world7th.net.[/url]
182 IN PTR mail.world7th.net.
183 IN PTR [url]www.world7th.org.[/url]
184 IN PTR mail.world7th.org
185 IN PTR [url]www.world7th.cn[/url]
186 IN PTR mail.world7th.cn
gedit named.rfc1912.zones
gedit named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
//query-source port 53;
//query-source-v6 port 53;
allow-query { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
gedit named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};
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 "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 "world7th.net" IN {
type master;
file "world7th.net.zone";
allow-update { none; };
};
zone "world7th.org" IN {
type master;
file "world7th.org.zone";
allow-update { none; };
};
zone "world7th.cn" IN {
type master;
file "world7th.cn.zone";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.local";
allow-update { none; };
};
我按照上面的文章搭建DNS,当我在虚拟机下作的时候是正确的,可以显示的服务器和IP的,当我在真实环境下作的时候,显示的却是错误的,
[root@rhel5 named]# nslookup
> [url]www.world7th.net[/url]
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: [url]www.world7th.net[/url]
Address: 218.83.175.155
> [url]www.world7th.org[/url]
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: [url]www.world7th.org[/url]
Address: 218.83.175.155
> [url]www.world7th.cn[/url]
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: [url]www.world7th.cn[/url]
Address: 159.226.7.162
> mail.world7th.net
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: mail.world7th.net
Address: 218.83.175.155
> mail.world7th.org
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: mail.world7th.org
Address: 218.83.175.155
> mail.world7th.cn
Server: 124.74.213.68
Address: 124.74.213.68#53
Non-authoritative answer:
Name: mail.world7th.cn
Address: 218.83.175.155
>
我也是第一次弄DNS,不知道是啥原因,我把我的配置文件铁出来,大家给个建议吧,配置文件我和虚拟机下的都是按照上面的网址的文字搭建的,却欻现不一样的问题,实在有点郁闷,我把配置文件铁出来
gedit world7th.cn.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS world7th.cn
IN MX 10 mail.world7th.cn
www IN A 192.168.1.185
mail IN A 192.168.1.186
localhost IN A 127.0.0.1
gedit world7th.net.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS world7th.net
IN MX 10 mail.world7th.net
www IN A 192.168.1.181
mail IN A 192.168.1.182
localhost IN A 127.0.0.1
gedit world7th.org.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS world7th.org
IN MX 10 mail.world7th.org
www IN A 192.168.1.183
mail IN A 192.168.1.184
localhost IN A 127.0.0.1
上面三个都是一个类型的
gedit 1.168.192.in-addr.local
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS world7th.net.
IN NS world7th.org.
IN NS world7th.cn.
181 IN PTR [url]www.world7th.net.[/url]
182 IN PTR mail.world7th.net.
183 IN PTR [url]www.world7th.org.[/url]
184 IN PTR mail.world7th.org
185 IN PTR [url]www.world7th.cn[/url]
186 IN PTR mail.world7th.cn
gedit named.rfc1912.zones
gedit named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
//query-source port 53;
//query-source-v6 port 53;
allow-query { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
gedit named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};
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 "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 "world7th.net" IN {
type master;
file "world7th.net.zone";
allow-update { none; };
};
zone "world7th.org" IN {
type master;
file "world7th.org.zone";
allow-update { none; };
};
zone "world7th.cn" IN {
type master;
file "world7th.cn.zone";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.local";
allow-update { none; };
};
以上就是我所以的配置文件,我在虚拟机下可以成功的,在真实的环境下却不行,希望大虾给指点下,到底是那里出来问题,我是ADSL的用户,实验是可以上网,我的网卡的ip是192.168.1.123,希望帮帮我吧。
本文转自你是路人甲还是霍元甲博客51CTO博客,原文链接http://blog.51cto.com/world77/148010如需转载请自行联系原作者
world77