
我有一些奇怪的 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
...