歡迎您光臨本站 註冊首頁

同名CNAME,MX能否共存,跪求高手指點

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

同名CNAME,MX能否共存,跪求高手指點

同名CNAME,MX能否共存

.com的域文件內有如下數據

test     CNAME     www.test.com.
test     MX   10     3.3.3.3.
bind DNS 將出現錯誤,且整個.com都會當掉。
錯誤信息如下
07-七月-2009 9:40:35.196 error: dns_master_load: zone.com.txt:14: test.com: CNAME and other data
07-七月-2009 9:40:35.196 error: zone ws/IN: loading from master file zone.com.txt failed: CNAME and other data

只要刪除兩條中的任意一條Bind DNS就能正常工作。

請問有沒有什麼辦法 讓可以上兩條解析同時生效。

bind Dns版本9.6.1

[ 本帖最後由 jackychuen 於 2009-7-7 17:06 編輯 ]
《解決方案》

相同主機名的MX記錄與CNAME記錄不能共存。
《解決方案》

原帖由 llzqq 於 2009-7-7 16:59 發表 http://bbs2.chinaunix.net/images/common/back.gif
相同主機名的MX記錄與CNAME記錄不能共存。

新網的DNS能做進去同名的MX,CNAME。不懂是漏洞還是通過某種方式實現了

[ 本帖最後由 llzqq 於 2009-7-9 10:04 編輯 ]
《解決方案》

在一個域中不能出現同名的CNAME,MX,要怎樣才能讓
est     CNAME     www.test.com.
test     MX   10     3.3.3.3.
解析有效?
集中大夥的智慧,或許會有解決辦法的
《解決方案》

est     CNAME     www.test.com.
test     MX   10     3.3.3.3.

改為:

www     A            3.3.3.3
test     MX   10     www.test.com.

[ 本帖最後由 llzqq 於 2009-7-8 06:18 編輯 ]
《解決方案》

樓上的方法好像不錯,但是沒有地方測試。
《解決方案》

雖然不知道為什麼,但書上及手冊都說mx 不要設為ip, 要為domain name.

若以下情況,沒有相關mx 設置:
test.007.com.     CNAME     www.test.com.

此時發信到user@test.007.com,會不會也會發到www.test.com 域的mx 主機?

我猜會。
《解決方案》

原帖由 jackychuen 於 2009-7-7 17:10 發表 http://bbs2.chinaunix.net/images/common/back.gif


新網的DNS能做進去同名的MX,CNAME。不懂是漏洞還是通過某種方式實現了

這是腦殘的做法,明目張胆地和RFC對著干。
《解決方案》

If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different.  This rule also insures that a cached CNAME can be
used without checking with an authoritative server for other RR types.

沒事多讀讀RFC,還是很不錯的。這個是rfc1034上的
《解決方案》

bind 9.6的幫助文檔中有:
multiple-cnames This option was used in BIND 8 to allow a domain name to have multiple CNAME
records in violation of the DNS standards. BIND 9.2 onwards always strictly enforces the CNAME
rules both in master files and dynamic updates.
從這段話可以了解到9.2起在主文件和動態更新中都嚴格執行CNAME規則.CNAME規則應該包括
(flyaway57 朋友提供的資料)
If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different.  This rule also insures that a cached CNAME can be
used without checking with an authoritative server for other RR types.

在下愚見 要實現同名CNAME,MX只能通過修改BIND源碼來實現。

綜合llzqq ,anthonyfeng 的建議這樣做還是有很大潛在風險。

=============================================
感謝版主大人llzqq,及樓上各位的熱心支持。希望大家再各抒己見,相互學習,一起進步。
=============================================

[火星人 ] 同名CNAME,MX能否共存,跪求高手指點已經有1577次圍觀

http://coctec.com/docs/service/show-post-21584.html