学习
实践
活动
专区
工具
TVP
写文章

轻量应用服务器该如何配置PTR反向解析?

  • 回答 (1)
  • 关注 (0)
  • 查看 (184)

系统:Ubuntu v20,使用apt安装的bind9,域名为legendmail.fun 公网ip:139.155.243.116

name.conf.local文件

zone "legendmail.fun" IN {
	type master;
	file "/etc/bind/legendmail.fun.zone";
};

//139.155.243.116
zone "243.155.139.in-addr.arpa" IN {
        type master;
        file "/etc/bind/139.155.243.zone";
};

legendmail.fun.zone文件

$TTL 1D
@       IN SOA  dns.legendmail.top. root.legendmail.top. (
                                        20191124      ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@                       IN      NS      dns.legendmail.top.
dns.legendmail.top.           IN      A       139.155.243.116
legendmail.top.         IN      A       8.8.8.8

139.155.243.zone文件

$TTL 1D
@       IN SOA  dns.legendmail.fun. root.legendmail.fun. (
                                        20181125      ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@               IN      NS         dns.legendmail.fun.
116              IN      PTR        legendmail.fun.

正向解析

; <<>> DiG 9.16.1-Ubuntu <<>> -t a legendmail.fun
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34190
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;legendmail.fun.			IN	A

;; ANSWER SECTION:
legendmail.fun.		600	IN	A	139.155.243.116

;; Query time: 128 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Oct 30 00:04:57 CST 2021
;; MSG SIZE  rcvd: 59

反向解析

; <<>> DiG 9.16.1-Ubuntu <<>> -x 139.155.243.116
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48541
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;116.243.155.139.in-addr.arpa.	IN	PTR

;; AUTHORITY SECTION:
in-addr.arpa.		1800	IN	SOA	ptr1.dnspod.net. admin.ptr1.dnspod.net. 1593538200 604800 86400 2419200 604800

;; Query time: 192 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Oct 30 00:05:01 CST 2021
;; MSG SIZE  rcvd: 114
用户9132290用户9132290提问于

可能回答问题的人

  • 腾讯云计算产品团队

    腾讯云 · 产品团队 (已认证)

    228 粉丝0 提问0 回答
  • 腾讯云计算产品

    38 粉丝0 提问9 回答
  • 小仙女和科学家

    10 粉丝0 提问0 回答
  • 溪歪歪

    439 粉丝1 提问1 回答
  • DRRR

    腾讯云 · 产品经理 (已认证)

    8 粉丝0 提问4 回答
  • 腾讯云DNSPod团队

    98 粉丝0 提问5 回答

关注

腾讯云开发者公众号
10元无门槛代金券
洞察腾讯核心技术
剖析业界实践案例
腾讯云开发者公众号二维码

扫码关注腾讯云开发者

领取腾讯云代金券