LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1086|回复: 14

AS4 DNS问题!(转贴)

[复制链接]
发表于 2005-8-28 18:43:41 | 显示全部楼层 |阅读模式
需要:内网需要做一台mail的server ,网域:chinamk.com,网内有windows 2003 PDC,
Linux AS4架设内部邮件服务器,Linux主机名:test.chinamk.com,但是我首先在AS4上做DNS

的设置上就出现了问题,查过好多贴子都无法解决,现贴上错误提示和我的设置文件,还请各

位给予指点。
环境:全新完整安装 Redhat AS4
Linux IP:192.168.0.5

运行 host 192.168.0.5 如下提示:
Host 5.0.168.192.in-addr.arpa not found :2(SERVFAIL)

运行 host test.chinamk.com 如下提示:
Host test.chinamk.com not found :2(SERVFAIL)

我的各项配置文件如下:
//    /etc/sysconfig/network-scripts/ifcfg-eth0 的配置文件

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:FDE:64
IPADDR=192.168.0.5
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet


//    /etc/hosts 的配置文件

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               test.chinamk.com test localhost.localdomain localhost


//    /etc/resolv.conf 的配置文件

search chinamk.com
nameserver 192.168.0.5


//    /etc/sysconfig/network 的配置文件

NETWORKING=yes
HOSTNAME=test.chinamk.com
GATEWAY=192.168.0.1


//    /etc/named.conf 的配置文件

//
// named.conf for Red Hat caching-nameserver
//

options {
       directory "/var/named";
       dump-file "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
       forwarders {192.168.0.5;};
       /*
        * 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;
};

//
// a caching only nameserver config
//
controls {
       inet 127.0.0.1 allow { localhost;192.168.0.5; } keys { rndckey; };
};

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 "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
       type master;
       file "named.ip6.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 "chinamk.com" IN {
       type master;
       file "chinamk";
};

zone "0.168.192.in-addr.arpa" IN {
       type master;
       file "192.168.0";
};
include "/etc/rndc.key";


//    /var/named/chinamk 正向搜索的配置

$TTL 2h
chinamk.com. IN SOA test.chinamk.com. root.test.chinamk.com.(
20050726 ;serial number
2h ;refresh timeout
40m ;retry refresh timeout
1w ;expire timeout
2h ;TTL time
)
chinamk.com. IN NS test.chinamk.com.
test IN A 192.168.0.5
chinamk.com. IN MX 10 test.chinamk.com.


//  /var/named/192.168.0 反向搜索的配置

$TTL 2h
@ IN SOA test.chinamk.com. root.test.chinamk.com.(
20050726 ;serial number
2h ;refresh timeout
40m ;retry refresh timeout
1w ;expire timeout
2h ;TTL time
)
0.168.192.in-addr.arpa. IN NS test.chinamk.com.
5 IN PTR test.chinamk.com.

请各位帮帮看看,错在哪里?
发表于 2005-8-28 20:09:18 | 显示全部楼层
// /etc/hosts 的配置文件

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 test.chinamk.com test localhost.localdomain localhost
你先改为
127.0.0.1  localhost.localdomain localhost
192.168.0.5 test.chinamk.com test

你运行一下hostname告诉我结果.
回复 支持 反对

使用道具 举报

发表于 2005-8-29 10:36:36 | 显示全部楼层
结果是一样的.
还是localhost.localdomain
回复 支持 反对

使用道具 举报

发表于 2005-8-29 16:19:36 | 显示全部楼层

我也出现这样的问题

我如楼主的问题也是一样,都有一个多月了,尝试过很多方法,都无法解决,我以前在AS3里用上述的配置可以解析成功。
回复 支持 反对

使用道具 举报

发表于 2005-8-29 17:37:52 | 显示全部楼层
楼主约个时候   我ssh到人主机帮助你解决
回复 支持 反对

使用道具 举报

发表于 2005-8-29 18:49:14 | 显示全部楼层
应该是
named.conf的问题吧
我用的Gentoo,bind默认仅监听127.0.0.1的53端口,下面是我的named.conf的配置,和RHEL4的有些差别
  1. acl "lan" { 192.168.1.0/24; };

  2. options {
  3.         directory "/var/bind";

  4.         // uncomment the following lines to turn on DNS forwarding,
  5.         // and change the forwarding ip address(es) :
  6.         //forward first;
  7.         forwarders {
  8.                 210.52.149.2;
  9.                 211.98.2.4;
  10.                 202.96.64.68;
  11.         };

  12.         listen-on-v6 { none; };
  13.         listen-on { 192.168.1.9; };

  14.         // to allow only specific hosts to use the DNS server:
  15.         //allow-query {
  16.         //        127.0.0.1;
  17.         //};

  18.         // if you have problems and are behind a firewall:
  19.         //query-source address * port 53;
  20.         pid-file "/var/run/named/named.pid";
  21. };

  22. view "internal" {

  23. match-clients { !192.168.1.1; lan; };

  24. zone "." IN {
  25.         type hint;
  26.         file "named.ca";
  27. };

  28. zone "localhost" IN {
  29.         type master;
  30.         file "pri/localhost.zone";
  31.         allow-update { none; };
  32.         notify no;
  33. };

  34. zone "ShadowStar.org" IN {
  35.         type master;
  36.         file "pri/shadow.zone";
  37.         allow-update { none; };
  38.         notify no;
  39.         allow-transfer { !192.168.1.1; lan; };
  40. };

  41. zone "168.192.in-addr.arpa" IN {
  42.         type master;
  43.         file "pri/192.zone";
  44.         allow-update { none; };
  45.         notify no;
  46. };

  47. zone "127.in-addr.arpa" IN {
  48.         type master;
  49.         file "pri/127.zone";
  50.         allow-update { none; };
  51.         notify no;
  52. };
  53. };

  54. view "external" {

  55. match-clients { any; };
  56. zone "." IN {
  57.         type hint;
  58.         file "named.ca";
  59. };

  60. zone "my.domain" IN {
  61. type slave;
  62. file "slave.my.domain.int";
  63. masters { 210.52.149.2; };
  64. transfer-source 210.49.52.3;
  65. };

  66. };
复制代码
controls {
inet 127.0.0.1 allow { localhost;192.168.0.5; } keys { rndckey; };
};

应该是inet的设定,改为192.168.0.5试试
回复 支持 反对

使用道具 举报

发表于 2005-9-1 08:32:26 | 显示全部楼层

还是老样子

我也修改了inet部分的内容,添加了本机的ip地址。还是无效。这些是很纳闷的!
回复 支持 反对

使用道具 举报

发表于 2005-9-1 21:32:56 | 显示全部楼层
keke

我在A4上做非常的正常啊
回复 支持 反对

使用道具 举报

发表于 2005-9-2 00:11:11 | 显示全部楼层
是不是没有注意到chroot环境呀?
mv /var/named/chinamk /var/named/chroot/var/named/chinamk
mv /var/named/192.168.0 /var/named/chroot/var/nmed/192.168.0
回复 支持 反对

使用道具 举报

发表于 2005-9-2 11:29:28 | 显示全部楼层
chroot出来这么久了    不会没有注意到这些的吧

如果是的话你再注意一下jail啊
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表