Author Topic: centos 5.x ispconfig 3.0 มีปัญหา dns zone file ไม่ขึ้น  (Read 9629 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
centos 5.x ispconfig 3.0 มีปัญหา dns zone file ไม่ขึ้น
« on: ธันวาคม 02, 2011, 07:24:14 PM »
พอดีผมได้ลง centos 5.5 + ispconfig 3 ครับ

มีปัญหาตอนแอด zone file เข้าไปในระบบ มันแจ้ง error ใน /var/log/message

ว่าหา " _default/xxxgolf.com/IN: file not found" 

ลองไล่ดูแล้วเหมือนจะเป็น การ coding ของส่วน ispconfig ตอนแอด dns กับ bind chroot

ผมเลยทำการ ลบ bind chroot ออกก่อนครับ

#/etc/init.d/named stop
#yum remove bind-chroot

เสร็จแล้วทำเรียกใช้งาน bind ธรรมดา

ypbind-1.19-12.el5_6.1
bind-utils-9.3.6-16.P1.el5_7.1
bind-9.3.6-16.P1.el5_7.1
bind-libs-9.3.6-16.P1.el5_7.1

ทำการ config /etc/named.conf
#################################Begin  of /etc/named.conf ##########################
//
// named.conf
//
// Provided by Red Hat bind 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.
//
options {
        listen-on port 53 { any; };
        //listen-on-v6 port 53 { any; };
        directory       "/var/named/chroot/var/named";
        //dump-file       "/var/named/chroot/var/named/data/cache_dump.db";
        statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
        //memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;
};

logging {
  channel config_log {
    file "log/config.log" versions 2 size 100K;
    print-severity yes; print-category yes;
  };
  channel query_log {
    file "log/queries.log" versions 1 size 250K;
    print-time yes; print-category yes;
  };
  channel default_log {
    file "log/default.log" versions 1 size 250K;
    print-time yes; print-category yes;
  };
  category config   { config_log; };
  category default  { default_log; };
  category notify   { default_log; };
  category security { default_log; };
  category queries  { query_log; };
};




zone "." IN {
        type hint;
        file "/var/named/chroot/var/named/named.root";
};

include "/etc/named.conf.local";
################################# End of /etc/named.conf ##########################

เสร็จแล้วทำการ add dns zone file ลงที่ ispconfig โดย เข้าไปที่ ispconfig cp ครับ

login -> DNS -> Add new DNS zone (SOA) ->
ทำการสร้าง dns zone ใหม่

Server : เลือก server ที่สร้างไว้
Client :  เลือก client ที่สร้างไว้
Zone (SOA) : xxxgolf.com.
NS : ns.xxxgolf.com.
Email : golfreeze.packetlove.com.
active : ทำการติ๊กถูก

แล้วกดแทบ ไปที่ "Records" -> NS

ทำการ สร้าง NS

Zone : ปล่อยว่างไว้ [Blank]
Nameserver Hostname : NS1
TTL : 86400
Active : yes

แล้วกลับไปที่แทบ DNS zones -> กด save ครับ

แค่นี้ก็สามารถเรียก name server ได้แล้วครับผม

#dig @127.0.0.1 ns1.xxxgolf.com any
ก็จะได้ค่าออกมาครับผม