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

以上就是我所以的配置文件,我在虚拟机下可以成功的,在真实的环境下却不行,希望大虾给指点下,到底是那里出来问题,我是ADSL的用户,实验是可以上网,我的网卡的ip是192.168.1.123,希望帮帮我吧。

转载于:https://blog.51cto.com/world77/148010

奇怪的DNS问题,虚拟机下可以,真实的环境却出错,希望大家帮助下相关推荐

  1. 在Win32下搭建opengl绘制环境

    在官方标准教程中使用glfw3来创建opengl的窗体,处理输入相关消息.本文介绍下如何在win32下搭建opengl绘制环境. 以下是在win32下搭建opengl绘制环境的流程 1.入口函数:in ...

  2. 虚拟服务器声卡,怎么在Win7系统Hyper-v虚拟机中接真实机声卡

    怎么在Win7系统Hyper-v虚拟机中接真实机声卡,虚拟机中XP只能支持播放不能录音,微软文档说Win2008 R2能支持录音,但实际操作发现也是只支持播放,真机为Win7 企业版,虚拟机也是Win ...

  3. 电脑访问不了虚拟机ftp服务器,解决win环境下访问本机虚拟机中centos7 ftp服务器的问题...

    inux搭建ftp服务器 1.安装软件: yum install vsftpd 2.修改配置文件vsftpd.conf: vim /etc/vsftpd/vsftpd.conf 把anonymous_ ...

  4. 虚拟机怎么架设dns服务器,虚拟机centos7 DNS服务器搭建

    服务器端: 前期工作: 切换到NAT模式 (1)关闭防火墙以及SeLinux. 防火墙相关设置: systemctl stop firewalld  //临时关闭防火墙 systemctl disab ...

  5. [亲测]在Mac下配置php开发环境:Apache+php+MySql

    公司给我们配上了高大上的Apple Mac Pro本本,这两天自己正在习惯中.通过虚拟机PD,确实解决了一些因为工作习惯无法在iOS上很好完成的事情,但是我想,既然用起了iOS就尽量将一些事务在iOS ...

  6. GCC编译器简明教程(Linux下C语言开发环境的搭建)

    GCC编译器简明教程(Linux下C语言开发环境的搭建) 市面上常见的Linux都是发行版本,典型的Linux发行版包含了Linux内核.桌面环境(例如GNOME.KDE.Unity等)和各种常用的必 ...

  7. 乐鑫Esp32学习之旅② 巧用eclipes编辑器,官方教程在Windows下搭建esp32开发环境,打印 “Hello World”。

    本系列博客学习由非官方人员 半颗心脏 潜心所力所写,仅仅做个人技术交流分享,不做任何商业用途.如有不对之处,请留言,本人及时更改. 1. 爬坑学习新旅程,虚拟机搭建esp32开发环境,打印 " ...

  8. linux下的常用命令 + 环境配置 + 数据库安装 一步到位!

    文章目录 一.引言 1.1 开发环境(dev) 1.2 测试环境(test) 1.3 生产环境(prod) 1.4 操作系统的选择 二.Linux介绍 2.1 Linux介绍 2.2 Linux的版本 ...

  9. 整理关于牛人们对图书管理系统领域建模的精彩讨论,以此希望大家学习下别人是如何思考的...

    整理关于牛人们对图书管理系统领域建模的精彩讨论,以此希望大家学习下别人是如何思考的 原文:整理关于牛人们对图书管理系统领域建模的精彩讨论,以此希望大家学习下别人是如何思考的 关于图书管理系统的业务大家 ...

最新文章

  1. 程序员的自我修养--链接、装载与库笔记:Windows下的动态链接
  2. Redis 通用操作1
  3. Android内存分析和调优
  4. mysql 的 外连查询
  5. SAP CRM产品主数据无法根据产品描述字段进行搜索的原因
  6. 腾讯安全携手华夏银行“论道”金融风控,传递在线反欺诈干货建议
  7. 系统大小端的头文件定义
  8. jquery事件绑定和解除绑定bind、unbind、one
  9. 用户态文件系统fuse学习
  10. 如何在装有 macOS Monterey 的 Mac 上使用省电模式?
  11. Python Web开发
  12. SAP License:财务流程-新
  13. VSF表格 粘贴板ClipBoard 将数据粘贴到表格 VB6.0
  14. 神舟笔记本怎么进入bios?神舟笔记本bios设置U盘启动教程
  15. linux上2048游戏程序,在Linux系统下完全可以玩2048游戏
  16. 那些脑残粉请闭嘴好吗,这不是硬科幻
  17. 交流电源和直流电源有什么区别?
  18. Android Studio扩展显示器分屏展示多项目后窗口空白问题解决
  19. 【产品】智能管道设计运维一体化平台 - AIPIPE 2022R2版本新功能详解
  20. 有各组方差怎么算组间平方和_方差分析中组内离差平方和,组间离差平方和的意义...

热门文章

  1. python中的for else语句
  2. java实现kmp_java 实现KMP算法
  3. php oci8 11,Linux下PHP5.2 Oracle客户端扩展(OCI8)安装
  4. docker 安装 mariadb
  5. Spring mvc 重定向
  6. Node.js npm
  7. pytorch nn.ReLU
  8. opencv-api threshold
  9. C语言把整数转换为字符串
  10. freecplus框架-MySQL数据库操作