V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
v2byy
V2EX  ›  问与答

iptables 大佬来问了问题

  •  
  •   v2byy · 2021-08-07 10:08:52 +08:00 · 978 次点击
    这是一个创建于 964 天前的主题,其中的信息可能已经有所发展或是发生改变。

    tproxy

    Transparent proxying often involves "intercepting" traffic on a router. This is usually done with the iptables REDIRECT target; however, there are serious limitations of that method. One of the major issues is that it actually modifies the packets to change the destination address -- which might not be acceptable in certain situations. (Think of proxying UDP for example: you won't be able to find out the original destination address. Even in case of TCP getting the original destination address is racy.)

    在一些透明代理的资料,上面这段话中的加粗部分如何理解? UDP 无法知道原始的 dst address ?

    第 1 条附言  ·  2021-08-09 09:10:12 +08:00

    这里 看到REDIRECT 方式只支持TCP,而TPROXY方式可以支持TCP和UDP

    有个疑问是REDIRECT不支持UDP 透明代理的原因是什么?从iptables-extension文档看REDIRECT是可以支持-p UDP啊?

    2 条回复    2021-08-07 15:31:57 +08:00
    undef404
        1
    undef404  
       2021-08-07 10:19:50 +08:00
    意思是只能看到代理的地址。看不到被代理的那个地址。
    v2byy
        2
    v2byy  
    OP
       2021-08-07 15:31:57 +08:00
    @undef404 UDP 代理跟 TP 代理有区别么?如果没有,这里为什么单独拿 UDP 出来说事?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1268 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:52 · PVG 01:52 · LAX 10:52 · JFK 13:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.