我有一些奇怪的 DNS 查询,但我找不到为什么或者哪个进程在请求这样的查询。
我说的奇怪是指“-P”请求。系统似乎有某种幽灵“功能”,正在发送“-P”请求。
检查了 /var/log/messages 和所有其他日志,但什么也没有。
它看起来像这样:
750 4.880197 172.34.167.129 172.34.167.193 DNS 64 Standard query 0xa6d9 A -P
751 4.880228 172.34.167.129 172.34.167.193 DNS 64 Standard query 0xcf06 AAAA -P
752 4.882101 172.34.167.193 172.34.167.129 DNS 64 Standard query response 0xa6d9 Refused A -P
753 4.882122 172.34.167.193 172.34.167.129 DNS 64 Standard query response 0xcf06 Refused AAAA -P
细节:
No. Time Source Destination Protocol Length Info
750 4.880197 172.34.167.129 172.34.167.193 DNS 64 Standard query 0xa6d9 A -P
Frame 750: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
Linux cooked capture
Internet Protocol Version 4, Src: 172.34.167.129, Dst: 172.34.167.193
User Datagram Protocol, Src Port: 27798, Dst Port: 53
Domain Name System (query)
[Response In: 752]
Transaction ID: 0xa6d9
Flags: 0x0100 Standard query
Questions: 1
Answer RRs: 0
Authority RRs: 0
Additional RRs: 0
Queries
-P: type A, class IN
Name: -P
[Name Length: 2]
[Label Count: 1]
Type: A (Host Address) (1)
Class: IN (0x0001)
No. Time Source Destination Protocol Length Info
751 4.880228 172.34.167.129 172.34.167.193 DNS 64 Standard query 0xcf06 AAAA -P
Frame 751: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
Linux cooked capture
Internet Protocol Version 4, Src: 172.34.167.129, Dst: 172.34.167.193
User Datagram Protocol, Src Port: 27798, Dst Port: 53
Domain Name System (query)
[Response In: 753]
Transaction ID: 0xcf06
Flags: 0x0100 Standard query
Questions: 1
Answer RRs: 0
Authority RRs: 0
Additional RRs: 0
Queries
-P: type AAAA, class IN
Name: -P
[Name Length: 2]
[Label Count: 1]
Type: AAAA (IPv6 Address) (28)
Class: IN (0x0001)
No. Time Source Destination Protocol Length Info
752 4.882101 172.34.167.193 172.34.167.129 DNS 64 Standard query response 0xa6d9 Refused A -P
Frame 752: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
Linux cooked capture
Internet Protocol Version 4, Src: 172.34.167.193, Dst: 172.34.167.129
User Datagram Protocol, Src Port: 53, Dst Port: 27798
Domain Name System (response)
[Request In: 750]
[Time: 0.001904000 seconds]
Transaction ID: 0xa6d9
Flags: 0x8105 Standard query response, Refused
Questions: 1
Answer RRs: 0
Authority RRs: 0
Additional RRs: 0
Queries
-P: type A, class IN
Name: -P
[Name Length: 2]
[Label Count: 1]
Type: A (Host Address) (1)
Class: IN (0x0001)
No. Time Source Destination Protocol Length Info
753 4.882122 172.34.167.193 172.34.167.129 DNS 64 Standard query response 0xcf06 Refused AAAA -P
Frame 753: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
Linux cooked capture
Internet Protocol Version 4, Src: 172.34.167.193, Dst: 172.34.167.129
User Datagram Protocol, Src Port: 53, Dst Port: 27798
Domain Name System (response)
[Request In: 751]
[Time: 0.001894000 seconds]
Transaction ID: 0xcf06
Flags: 0x8105 Standard query response, Refused
Questions: 1
Answer RRs: 0
Authority RRs: 0
Additional RRs: 0
Queries
-P: type AAAA, class IN
Name: -P
[Name Length: 2]
[Label Count: 1]
Type: AAAA (IPv6 Address) (28)
Class: IN (0x0001)
答案1
我认为这是一个简单配置错误的结果,其中需要一个主机名变量但却丢失了,并且下一个命令行选项-P
被解释为主机名参数。
像这样:
HOST=""
PORT=""
/path/to/command $OTHER_ARGS -H $HOST -P $PORT
由于变量为空或缺失,其内容如下:
/path/to/command -H -P
查找哪个应用程序可能像查找支持-P
命令行开关的应用程序(无法正确运行)一样简单或困难...