想建一个自用的 DNS 服务器,配置好以后在本服务器上用 dig @122.my.dns.ip test.cn
测试,DNS 解析如预期进行(123.1.1.1):
root@ubuntu-shanghai:~# dig @122.xx.xx.xx www.baidu.com
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> @122.xx.xx.xx www.baidu.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2438
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.baidu.com. IN A
;; ANSWER SECTION:
www.baidu.com. 0 IN A 123.1.1.1
;; Query time: 0 msec
;; SERVER: 122.xx.xx.xx#53(122.xx.xx.xx)
;; WHEN: Wed Feb 19 19:21:42 CST 2020
;; MSG SIZE rcvd: 47
但是在自己电脑上用同样的命令,解析结果却和普通公共 DNS 一样(没有 123.1.1.1):
mashiro@Mashiro:~$ dig @122.xx.xx.xx www.baidu.com
; <<>> DiG 9.11.3-1ubuntu1.2-Ubuntu <<>> @122.xx.xx.xx www.baidu.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59985
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;www.baidu.com. IN A
;; ANSWER SECTION:
www.baidu.com. 208 IN CNAME www.a.shifen.com.
www.a.shifen.com. 40 IN A 183.232.231.174
www.a.shifen.com. 40 IN A 183.232.231.172
;; ADDITIONAL SECTION:
ns.serverflag. 3600 IN A 127.0.0.1
;; Query time: 8 msec
;; SERVER: 122.xx.xx.xx#53(122.xx.xx.xx)
;; WHEN: Wed Feb 19 19:22:05 CST 2020
;; MSG SIZE rcvd: 119
看到腾讯的一条通知: https://cloud.tencent.com/document/product/213/35533
一两年前也在腾讯云上搭过 DNS,当时是可以的,不知这次是被劫持了还是我配置不当?
望有类似经验的能指点一二.
1
Tink 2020-02-19 20:05:58 +08:00 via iPhone
53 端口不开
|
2
opengps 2020-02-19 20:06:40 +08:00 via Android
国内云厂商默认关闭 25,53 端口
|
3
lishunan246 2020-02-20 03:44:25 +08:00 via Android
可以试试 DoH。
|