工作示例

工作示例

我在这里经营一些小型 ISP,拥有几个 IP 范围。

我向一些客户提供了一些公共 IP 地址,他们正在这些地址上运行邮件服务器。他们要求我PTR为他们的 IP 添加反向 DNS 条目 ()。

我的服务器上正在运行 Bind。我可以PTR在同一台服务器/同一文件中添加多条记录吗?

我拥有的 IP 范围:192.168.10.0/24

Customer A: 192.168.10.103  
Customer B: 192.168.10.199  
Customer C: 192.168.10.169  
Customer D: 192.168.10.69  

谢谢。

答案1

正如你所看到的这个 TLDP 示例您可以PTR在同一区域中拥有多个记录。

$TTL 3D
@               IN      SOA     yourdomain.com. root.yourdomain.com. (
                                199609206       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                86400)  ; Minimum TTL
                        NS      ns1.yourdomain.com.
                        NS      ns2.yourdomain.net.
;
;       Servers
;
1       PTR     router.yourdomain.com.
2       PTR     server.yourdomain.com.
;
;       Customers
;
69      PTR     mail.customerD.com.
103     PTR     mail.customerA.com.
169     PTR     mail.customerC.com.
199     PTR     mail.customerB.com.

将您分配的所有 IP 放入反向文件中以避免重复是一个好主意。

工作示例

我觉得这很好:

$ dig -x 103.249.240.224

; <<>> DiG 9.9.5-3ubuntu0.4-Ubuntu <<>> -x 103.249.240.224
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8551
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;224.240.249.103.in-addr.arpa.  IN  PTR

;; ANSWER SECTION:
224.240.249.103.in-addr.arpa. 1685 IN   PTR mk.localhost-server.com.

;; ADDITIONAL SECTION:
mk.localhost-server.com. 21526  IN  A   103.249.240.224

;; Query time: 2 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Aug 19 09:53:51 PDT 2015
;; MSG SIZE  rcvd: 99

$ dig mk.localhost-server.com

; <<>> DiG 9.9.5-3ubuntu0.4-Ubuntu <<>> mk.localhost-server.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61167
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mk.localhost-server.com.   IN  A

;; ANSWER SECTION:
mk.localhost-server.com. 21520  IN  A   103.249.240.224

;; Query time: 1 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Aug 19 09:53:56 PDT 2015
;; MSG SIZE  rcvd: 57

chicks@silver 09:53:56 ~ !515 $ 

现在它坏了

确认损坏:

$ dig -x 103.249.240.224

; <<>> DiG 9.9.5-3ubuntu0.3-Ubuntu <<>> -x 103.249.240.224
;; global options: +cmd
;; connection timed out; no servers could be reached

http://mxtoolbox.com/SuperTool.aspx?action=ptr%3a103.249.240.224&run=toolpage

PWS3v2 11784ms
  0  c.in-addr-servers.arpa  196.216.169.10  NON-AUTH  296 ms  Received 6 Referrals , rcode=NO_ERROR    103.in-addr.arpa.   86400   IN  NS  ns1.apnic.net,103.in-addr.arpa. 86400 IN    NS  ns2.lacnic.net,103.in-addr.arpa.    86400   IN  NS  ns3.apnic.net,103.in-addr.arpa. 86400   IN  NS  ns4.apnic.net,103.in-addr.arpa. 86400   IN  NS  sec1.authdns.ripe.net,103.in-addr.arpa. 86400   IN  NS  tinnie.arin.net,  

  1  ns4.apnic.net  202.12.31.140  NON-AUTH  187 ms  Received 4 Referrals , rcode=NO_ERROR    240.249.103.in-addr.arpa. 86400   IN  NS ns2.gazonindia.com,240.249.103.in-addr.arpa. 86400   IN  NS ns4.gazonindia.com,240.249.103.in-addr.arpa. 86400   IN  NS ns3.gazonindia.com,240.249.103.in-addr.arpa. 86400   IN  NS  ns1.gazonindia.com,  

  2  ns4.gazonindia.com  103.249.240.10  NON-AUTH  187 ms  Timeout after 3 sec, rcode=NO_ERROR      

  2  ns1.gazonindia.com  103.249.240.8  NON-AUTH  187 ms  Timeout after 3 sec, rcode=NO_ERROR      

  2  ns3.gazonindia.com  103.249.240.9  NON-AUTH  187 ms  Timeout after 3 sec, rcode=NO_ERROR      

  2  ns2.gazonindia.com    NON-AUTH  187 ms  Timeout resolving IP, rcode=NO_ERROR

看起来 Gazon 的服务器没有响应。因此,让我们通过以下方式找出可以联系的人whois

$ whois 103.249.240.224
% [whois.apnic.net]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html

% Information related to '103.249.240.0 - 103.249.243.255'

inetnum:        103.249.240.0 - 103.249.243.255
netname:        GAZON
descr:          Gazon Communications India Limited
admin-c:        KD220-AP
tech-c:         SA683-AP
country:        IN
mnt-by:         MAINT-IN-IRINN
mnt-irt:        IRT-IRINN-IN
status:         ASSIGNED portable
changed:        [email protected] 20130613
mnt-routes:     MAINT-IN-GAZON
source:         APNIC

irt:            IRT-IRINN-IN
address:        Flat no. 6B, Uppals M6 Plaza, 6 Jasola District Centre, New Delhi-110025
e-mail:         [email protected]
abuse-mailbox:  [email protected]
admin-c:        IH175-AP
tech-c:         IH174-AP
auth:           # Filtered
mnt-by:         MAINT-IN-IRINN
changed:        [email protected] 20120907
source:         APNIC

role:           System Admin
address:        Parason House, 28, Venkatesh Nagar, Aurangabad, Maharashtra
country:        IN
phone:          +91-9762055555
fax-no:         +91-2402332944
e-mail:         [email protected]
admin-c:        KD220-AP
tech-c:         KD220-AP
nic-hdl:        SA683-AP
remarks:        send spam and abuse report to [email protected]
notify:         [email protected]
abuse-mailbox:  [email protected]
mnt-by:         MAINT-IN-PARASON
changed:        [email protected] 20140801
source:         APNIC

person:         Kishor Desarda
address:        Parason House, 28, Venkatesh Nagar, Aurangabad, Maharashtra
country:        IN
phone:          +91-9762055555
fax-no:         +91-2402332944
e-mail:         [email protected]
nic-hdl:        KD220-AP
remarks:        send spam and abuse report to [email protected]
notify:         [email protected]
abuse-mailbox:  [email protected]
mnt-by:         MAINT-IN-PARASON
changed:        [email protected] 20140801
source:         APNIC

% Information related to '103.249.240.0/24AS132770'

route:          103.249.240.0/24
descr:          Gazon Communications India Limited
origin:         AS132770
country:        IN
mnt-lower:      MAINT-IN-IRINN
mnt-routes:     MAINT-IN-IRINN
mnt-by:         MAINT-IN-IRINN
changed:        [email protected] 20130708
source:         APNIC

% Information related to '103.249.240.0 - 103.249.243.255'

inetnum:        103.249.240.0 - 103.249.243.255
netname:        GAZON
descr:          Gazon Communications India Limited
admin-c:        KD1-IN
tech-c:         MN8-IN
country:        IN
mnt-by:         MAINT-IN-GAZON
mnt-irt:        IRT-GAZON-IN
status:         ASSIGNED portable
changed:        [email protected]
source:         APNIC

irt:            IRT-GAZON-IN
address:        Pune
phone:          +91 02065101230
fax-no:         +91 2402332944
e-mail:         [email protected]
abuse-mailbox:  [email protected]
admin-c:        KD1-IN
tech-c:         MN8-IN
auth:           CRYPT-PW yx9RQZOlthZT6
remarks:        send spam and abuse report to [email protected]
mnt-by:         MAINT-IN-GAZON
changed:        [email protected] 20130613
source:         IRINN

role:           Manager NOC
address:        Pune
country:        IN
phone:          +91 02065101230
fax-no:         +91 2402332944
e-mail:         [email protected]
admin-c:        KD1-IN
tech-c:         KD1-IN
nic-hdl:        MN8-IN
remarks:        send spam and abuse report to [email protected]
notify:         [email protected]
abuse-mailbox:  [email protected]
mnt-by:         MAINT-IN-GAZON
changed:        [email protected] 20130613
source:         IRINN

person:         Kishor Desarda
address:        Parason House, 28, Venkatesh Nagar, Jalna Road
country:        IN
phone:          +91 02065101230
fax-no:         +91 2402332944
e-mail:         [email protected]
nic-hdl:        KD1-IN
remarks:        send spam and abuse report to [email protected]
notify:         [email protected]
abuse-mailbox:  [email protected]
mnt-by:         MAINT-IN-GAZON
changed:        [email protected] 20130613
source:         IRINN

% Information related to '103.249.240.0/24AS132770'

route:          103.249.240.0/24
descr:          Gazon Communications India Limited
country:        IN
origin:         AS132770
remarks:        [email protected]
notify:         [email protected]
mnt-lower:      MAINT-IN-GAZON
mnt-routes:     MAINT-IN-GAZON
mnt-by:         MAINT-IN-GAZON
changed:        [email protected] 20130625
source:         IRINN

% This query was served by the APNIC Whois Service version 1.69.1-APNICv1r0 (UNDEFINED)

答案2

是的,你不仅PTR如果您的 IP 网络是,并且192.168.10.0/24因此有一个反向区域,那么10.168.192.in-addr.arpa您实际上没有合理的替代解决方案。

值得注意的是,反向区域唯一直接相关的是IP 网络区域中的指针记录可以引用任意数量区域中的名称(无论哪些名称是这些 IP 地址的规范名称)。

有一种常见的误解,认为反向区域与“正向”区域是配对的。
这完全不是事实,我只能猜测这种想法来自于文档和指南通常只展示一个示例,而不详细说明目的或两者之间的关系,或者更确切地说,这两个示例之间没有关系。

相关内容