我的 pihole 表明,我的 Linux PC(Debian 11 GNU/Linux)实际上正在与example.org(A和AAAA请求)交谈。我没有安装任何花哨的东西(Firefox、Thunderbird、nginx、Visual Code 等)。我怀疑这是某种“互联网 ping”。如何找到发起此请求的实际过程?非常感谢任何提示。谢谢。
1 回答
-1
iptables 可以记录进程的用户 ID,但不能记录进程 ID 或进程名称。
将规则添加到 OUTPUT 链。
iptables -A OUTPUT -m string --algo bm --string "example" -j LOG --log-prefix 'found example: ' --log-uid
进行查找:
nslookup example
检查您的日志:
tail /var/log/messages
它看起来像这样:
Feb 3 13:24:46 anhor kernel: [344630.225000] found example: IN= OUT=enx0050b60c19af SRC=192.168.2.118 DST=192.168.2.254 LEN=63 TOS=0x00 PREC=0x00 TTL=64 ID=4024 PROTO=UDP SPT=56456 DPT=53 LEN=43 UID=0 GID=0
Feb 3 13:24:46 anhor kernel: [344630.232213] found example: IN= OUT=enx0050b60c19af SRC=192.168.2.118 DST=192.168.2.254 LEN=63 TOS=0x00 PREC=0x00 TTL=64 ID=4025 PROTO=UDP SPT=34090 DPT=53 LEN=43 UID=0 GID=0
于 2022-02-03T12:31:30.767 回答