[英]Can docker host intercept local traffic inside a container?
Is it possible for the docker host to observe the communication between two processes running inside the same container? docker 主机是否可以观察运行在同一个容器内的两个进程之间的通信? The processes use TCP on localhost for communication.
这些进程使用本地主机上的 TCP 进行通信。
Most of the documentation I see talk about sniffing on the docker0 interface or any interface created by docker-compose.我看到的大多数文档都在谈论嗅探 docker0 接口或由 docker-compose 创建的任何接口。 But this would be outbound/inbound traffic on the network interface.
但这将是网络接口上的出站/入站流量。 In my case all communication is local.
就我而言,所有通信都是本地的。
I used bpftrace with tcpconnect.bt (or tcpaccept.bt) as you can see it can observe container localhost to container localhost tcp connect (or accept)我将 bpftrace 与 tcpconnect.bt(或 tcpaccept.bt)一起使用,因为您可以看到它可以观察容器 localhost 到容器 localhost tcp connect(或接受)
if you want to more detail, you could write your own bpf program如果你想更详细,你可以编写自己的 bpf 程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.