Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我在一个不公开任何端口的 docker 容器中获取了一个网页。我知道 iptables SNAT 收费将容器的 IP 转换为主机的 IP。但是当容器得到休息时,谁负责将主机的 IP 转换为容器的 IP?
这一切都由主机内核管理。它将 NAT 规则应用于传出数据包,并记住在收到响应时将其 ip 替换为容器的 ip。