Tập tin /etc/resolv.conf
Trích:
nameserver 192.168.1.190 //IP của server Linux
nameserver 203.162.4.190 //IP của ISP
|
Tập tin /etc/sysconfig/network
Trích:
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server.hoclinux123.com
|
Tập tin named.conf
Trích:
zone "hoclinux123.com" {
type master;
file "hoclinux123.com.db";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "1.168.192.in-addr.arpa.db";
};
|
Tập tin /var/named/chroot/var/named/1.168.192.in-addr.arpa.db
Trích:
$TTL 86400
@ IN SOA hoclinux123.com. root.hoclinux123.com.(
2004031901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS hoclinux123.com.
190 IN PTR hoclinux123.com.
|
Tập tin /var/named/chroot/var/named/hoclinux123.com.db
Trích:
$TTL 86400
@ IN SOA server.hoclinux123.com. root.hoclinux123.com.(
2006041401 ; Serial
7200 ; Refresh
7200 ; Retry
2419200 ; Expire
86400 ) ; Minimum
IN NS server.hoclinux123.com.
IN MX 10 hoclinux123.com.
server IN A 192.168.1.190
@ IN A 192.168.1.190
www IN A 192.168.1.190
ftp IN A 192.168.1.190
mail IN A 192.168.1.190
|
Khi start named thì thành công nhưng khi dùng nslookup thì gặp lỗi sau
nslookup server.hoclinux123.com
Server: 203.162.4.190
Address: 203.162.4.190#53
** server can't find server.hoclinux123.com: NXDOMAIN
Trong khi đó mình dùng nslookup từ Google
Trích:
nslookup google.com
Server: 203.162.4.190
Address: 203.162.4.190#53
Non-authoritative answer:
Name: google.com
Address: 74.125.67.100
Name: google.com
Address: 209.85.171.100
Name: google.com
Address: 74.125.45.100
|
Trong khi đó mình dùng dig
dig mx hoclinux123.com
Trích:
; <<>> DiG 9.3.4-P1 <<>> mx hoclinux123.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48290
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;hoclinux123.com. IN MX
;; AUTHORITY SECTION:
com. 900 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 1241366672 1800 900 604800 900
;; Query time: 259 msec
;; SERVER: 203.162.4.190#53(203.162.4.190)
;; WHEN: Mon May 4 06:32:11 2009
;; MSG SIZE rcvd: 107
|
ifconfig
Trích:
eth0 Link encap:Ethernet HWaddr 00:0C:29:63:AA:57
inet addr:192.168.1.190 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe63:aa57/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4468 errors:0 dropped:0 overruns:0 frame:0
TX packets:2857 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5518350 (5.2 MiB) TX bytes:257403 (251.3 KiB)
Interrupt:169 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:234 errors:0 dropped:0 overruns:0 frame:0
TX packets:234 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20688 (20.2 KiB) TX bytes:20688 (20.2 KiB)
|
cat /var/log/mesages
Trích:
May 4 06:40:38 server avahi-daemon[2231]: Registering new address record for fe80::20c:29ff:fe63:aa57 on eth0.
May 4 06:40:41 server avahi-daemon[2231]: New relevant interface eth0.IPv4 for mDNS.
May 4 06:40:41 server avahi-daemon[2231]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.190.
May 4 06:40:41 server avahi-daemon[2231]: Registering new address record for 192.168.1.190 on eth0.
|
Không hiểu sao khi dùng nslookup hiển thị
Server: 203.162.4.190 thay vì Server: 192.168.1.190 trên eth0
Mình dùng BIND DNS server , tắt firewall, selinux . Domain hoclinux không do mình quản lý nó không tồn tại trên internet, ** server can't find server.hoclinux123.com: NXDOMAIN là lỗi gì, mình sai xót ở đâu, xin giúp mình với.