大网数据广告活动
服务器运维问答

dig all txt records

· 52CE 我爱测

When I run the dig command, I only get one txt record: adriano@vm ~ dig swisspass.ch txt  ✔  4501  14:25:36 ; <<>> DiG 9.11.3-1ubuntu1.13-Ubuntu <<>> swisspass.ch txt ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opco…

问题原文

原帖链接 · Warok · CC BY-SA 4.0

When I run the dig command, I only get one txt record:

adriano@vm ~  dig swisspass.ch txt                                                                                   ✔  4501  14:25:36

; <<>> DiG 9.11.3-1ubuntu1.13-Ubuntu <<>> swisspass.ch txt
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47817
;; flags: qr rd ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;swisspass.ch.                  IN      TXT

;; ANSWER SECTION:
swisspass.ch.           900     IN      TXT     "v=spf1  include:spf2.sbb.ch include:spf.mandrillapp.com include:inx.ch include:amazonses.com include:spf.protection.outlook.com -all"

;; Query time: 20 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Feb 22 14:25:39 STD 2021
;; MSG SIZE  rcvd: 186

But if i check with an online tool (for example dig from google) I get more results:

What parameter should I add to my command to show ALL the txt records?

UPDATE: I formatted the output to show less informations, sorry

已采纳解答

原帖链接 · basekat · CC BY-SA 4.0

My guess is that your local DNS server (192.168.1.1) is somehow trimming the results.

You can try to query the google DNS servers with your dig utility and see if the output would be different compared to your local DNS server: dig @8.8.8.8 -t txt swisspass.ch

What about if you use `host'? host -t txt swisspass.ch 8.8.8.8

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-02-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。