config bin9

config bin9

ทำตามนี้ครับ
1. ลบออก ก่อนครับ ไม่จำเป็นต้องทำตามหนังสือ ครับ ทำตามนนี้ ก็ใช้ได้เหมือนกัน


วิธีการลบ ก็ apt-get --purge remove bind9 -y

ทำตามนี้

1. apt-getinstall bind9 -y
2. /etc/init.d/bind9 stop
3. nano /etc/bind/named.conf.local

zone "example.com" {
type master;
file "/etc/bind/zones/example.com.db";
};
zone "182.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.182.168.192.in-addr.arpa";
};

*** หมายเหตุ ตรง 182.168.192 ผมกลับ เลข ipนะ คงเข้าใจ

4. nano /etc/bind/named.conf.options

forwarders {
8.8.8.8;
4.4.4.4;
};

5. mkdir /etc/bind/zones

6. cd /etc/bind/zones


7. nano example.com.db

;
; BIND data file for local loopback interface
;
$TTL 604800
example.com. IN SOA ns1.example.com. root.example.com. (
1167268512 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
38400 ; minimum (10 hours 40 minutes)
)
NS ns1.example.com.
MX 25 mail.example.com.

ns1 A 192.168.182.1
www 192.168.182.1



8.nano rev.182.168.192.in-addr.arpa


$TTL 3600
@ IN SOA example.com. root.example.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

IN NS example.com.

103 IN PTR ns1.example.com.
103 IN PTR www.example.com.

9. nano /etc/resolv.conf

ใส่
nameserve localhost
หรือ
nameserver 8.8.8.8

แล้วก็ใส่ของ isp เราด้วย

nameserver 192.168.182.1;

10. /etc/init.d/bind9 restart
/etc/init.d/networking restart

by php code it

Comments