dns設定問題

這個版面主要討論 debian 在 server 端的應用問題, server 種類繁多..舉凡 Web Server 、 File Server、 DHCP Server..等等。

版主: 阿信

dns設定問題

文章week » 週六 7月 26, 2003 11:37 am

各位大大們好 :-)

小弟又來煩勞各位

小弟想用虛擬IP架內部網路內有dns.mail功能

小弟的設定
-------
實體線路的接法
-140.109.227.184(etho)--『debian.home』--192.168.1.1(eth1)
                    |--hub
             『nana.home』--192.168.1.3
             『week.home』--192.168.1.4
在debian.home上跑了NAT,DHCP
-------
/etc/resolv.conf:
search home
nameserver 192.168.1.1
-------
home domain設定檔為:
-------
正解
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA debian.home. root.debian.home. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS debian.home.
IN MX 20 debian.home.

debian IN A 192.168.1.1
week IN A 192.168.1.4
nana IN A 192.168.1.3
---------
反解
; BIND reverse data file for broadcast zone
;
$TTL 604800
@ IN SOA debian.home. root.debian.home. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS debian.home.
@ IN MX 20 debian.home.

1 IN PTR debian.home.
3 IN PTR nana.home.
4 IN PTR week.home.
-----

使用ping可得

PING tw.yahoo.com (202.1.237.21): 56 data bytes
64 bytes from 202.1.237.21: icmp_seq=0 ttl=248 time=75.4 ms
64 bytes from 202.1.237.21: icmp_seq=1 ttl=248 time=73.6 ms
64 bytes from 202.1.237.21: icmp_seq=2 ttl=248 time=75.5 ms
64 bytes from 202.1.237.21: icmp_seq=3 ttl=248 time=70.0 ms
64 bytes from 202.1.237.21: icmp_seq=4 ttl=248 time=68.5 ms
64 bytes from 202.1.237.21: icmp_seq=5 ttl=248 time=71.1 ms

PING debian.home (140.109.227.184): 56 data bytes
64 bytes from 140.109.227.184: icmp_seq=0 ttl=255 time=0.2 ms
64 bytes from 140.109.227.184: icmp_seq=1 ttl=255 time=0.1 ms
64 bytes from 140.109.227.184: icmp_seq=2 ttl=255 time=0.0 ms
64 bytes from 140.109.227.184: icmp_seq=3 ttl=255 time=0.0 ms
64 bytes from 140.109.227.184: icmp_seq=4 ttl=255 time=0.0 ms

PING week.home (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: icmp_seq=0 ttl=128 time=0.2 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=128 time=0.2 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=128 time=0.2 ms
64 bytes from 192.168.1.4: icmp_seq=3 ttl=128 time=0.2 ms

-----

小弟安裝了sendmail和ipopd這兩個套件
使用netstat -a 可發現

tcp 0 0 *:pop2 *:* LISTEN
tcp 0 0 *:daytime *:* LISTEN
tcp 0 0 *:pop3 *:* LISTEN
tcp 0 0 *:imap2 *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:imap3 *:* LISTEN

-----

然後,小弟就蠢蠢的打:

debian:~# mail week
Subject: test
testing! testing!
.
Cc:

再來從這裡發現
debian:~# tail /var/log/syslog | more

Jul 26 11:15:52 week sendmail[13707]: h6Q3FqnC013707: from=root, size=42, class=
0, nrcpts=1, msgid=<200307260315.h6Q3FqnC013707@debian.home>, relay=root@localho
st
Jul 26 11:15:52 week sm-mta[13709]: h6Q3FqhZ013709: from=<root@debian.home>, siz
e=312, class=0, nrcpts=1, msgid=<200307260315.h6Q3FqnC013707@debian.home>, proto
=ESMTP, daemon=MSA, relay=localhost [127.0.0.1]
Jul 26 11:15:52 week sendmail[13707]: h6Q3FqnC013707: to=week, ctladdr=root (0/0
), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30024, relay=[127.0.0.1] [
127.0.0.1], dsn=2.0.0, stat=Sent (h6Q3FqhZ013709 Message accepted for delivery)
Jul 26 11:15:55 week sm-mta[13711]: h6Q3FqhZ013709: to=<week@debian.home>, delay
=00:00:03, xdelay=00:00:03, mailer=relay, pri=120294, relay=none, dsn=5.1.2, sta
t=Host unknown (Name server: none: host not found)
Jul 26 11:15:55 week sm-mta[13711]: h6Q3FqhZ013709: h6Q3FthZ013711: DSN: Host un
known (Name server: none: host not found)

Jul 26 11:15:55 week sm-mta[13711]: h6Q3FthZ013711: to=<root@debian.home>, delay
=00:00:00, xdelay=00:00:00, mailer=relay, pri=31531, relay=none, dsn=5.1.2, stat
=Host unknown (Name server: none: host not found)
Jul 26 11:15:55 week sm-mta[13711]: h6Q3FthZ013711: h6Q3Ftha013711: return to se
nder: Host unknown (Name server: none: host not found)
Jul 26 11:15:55 week sm-mta[13711]: h6Q3Ftha013711: to=postmaster, delay=00:00:0
0, xdelay=00:00:00, mailer=relay, pri=32555, relay=none, dsn=5.1.2, stat=Host un
known (Name server: none: host not found)
Jul 26 11:15:55 week sm-mta[13711]: h6Q3FthZ013711: Saved message in /var/lib/se
ndmail/dead.letter
-----

小弟從這一行發現應該是dns設定有問題
stat=Host unknown (Name server: none: host not found)
不知小弟的觀念或作法哪邊錯誤,謝謝大大們的指導! :-D
week
可愛的小學生
可愛的小學生
 
文章: 16
註冊時間: 週三 7月 16, 2003 4:31 pm

re:dns設定問題

文章Tetralet » 週六 7月 26, 2003 12:26 pm

欸,
用 nslookup、dig、host 來檢查 DNS 是比較正統的做法哦...
時間並不能治療我心中的疼痛
南方的春天說什麼也溫暖不了我冰冷的血

誦唱大復活咒文,今天的 Tetralet 又在唧唧喳喳了 重生!
Tetralet
俺是博士
俺是博士
 
文章: 3078
註冊時間: 週四 11月 28, 2002 3:02 pm


回到 debian server

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客