liloli

iptables 在处理某个连接的返回数据包时,所谓的 Un-DNAT 到底发生在哪个表、哪个链?

  •  
  •   liloli · Aug 30, 2018 · 3646 views
    This topic created in 2840 days ago, the information mentioned may be changed or developed.

    https://www.frozentux.net/iptables-tutorial/iptables-tutorial.html#DNATTARGET

    这篇文章对 iptables 如何追踪 NAT 讲的比较详细,但我始终有一个问题没有找到答案。

    “ Now, all packets from the Internet going to port 80 on our firewall are redirected (or DNAT'ed) to our internal HTTP server. ” 从这句开始,作者简单描述了外网主机访问防火墙后面网页服务器的过程。

    1. 数据包流向防火墙外网端口

    2. 数据包抵达防火墙

    3. 防火墙对数据包进行 DNAT,遍历多个链

    4. 数据包离开防火墙,去往网页服务器

    5. 数据包抵达网页服务器,服务器发出应答,传给防火墙

    6. 防火墙 Un-DNAT 数据包,数据包的源地址被修改为防火墙外网端口地址

    7. 返回的数据包抵达原始客户端


    我的疑问是,第 6 步中对返回的数据包进行的所谓 “ Un-DNAT ” 究竟是走的 iptables 中的哪个表的哪个链?究竟是不是 SNAT ?

    有兴趣的朋友欢迎一起讨论一下。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5365 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 08:36 · PVG 16:36 · LAX 01:36 · JFK 04:36
    ♥ Do have faith in what you're doing.