iptables - 伪装的 NAT 延迟了跟踪路由中的第一跳

iptables - 伪装的 NAT 延迟了跟踪路由中的第一跳

我正在通过 ADSL/PPPoA -> PPPoE 桥设置我的 Linux(基于 Debian)路由器的 PPPoE 连接。连接在路由器本身上工作正常,但由于某种原因,通过 NAT 的跟踪路由需要很长时间才能获得第一跳(到 NAT)的结果。

大多数情况下,该跃点的结果只是 * * * 但有时该跃点确实会出现,并且在尝试第二个跃点之前会有很长的延迟。

这是根本不显示跳跃的情况:

CallumsMacBookAir:~ Callum$ traceroute google.co.uk
traceroute: Warning: google.co.uk has multiple addresses; using 173.194.41.95
traceroute to google.co.uk (173.194.41.95), 64 hops max, 52 byte packets
 1  * * * //LONG DELAY
 2  lo0-central10.ptn-ag03.plus.net (195.166.128.192)  22.578 ms  19.925 ms  20.990 ms
 3  link-a-central10.ptn-gw01.plus.net (212.159.2.136)  19.574 ms  19.786 ms  19.343 ms
 4  xe-5-3-0.ptw-cr01.plus.net (212.159.0.108)  19.540 ms  18.947 ms  25.387 ms
 5  72.14.222.97 (72.14.222.97)  19.911 ms  19.706 ms  19.512 ms
 6  209.85.246.244 (209.85.246.244)  19.423 ms  19.455 ms  19.655 ms
 7  72.14.238.51 (72.14.238.51)  20.234 ms  24.666 ms  20.076 ms
 8  lhr08s01-in-f31.1e100.net (173.194.41.95)  19.168 ms  19.518 ms  19.659 ms

有时它确实在第一跳中有响应,但仍然有一个星号:

CallumsMacBookAir:~ Callum$ traceroute google.co.uk
traceroute: Warning: google.co.uk has multiple addresses; using 173.194.41.95
traceroute to google.co.uk (173.194.41.95), 64 hops max, 52 byte packets
 1  192.168.0.253 (192.168.0.253)  0.770 ms *  0.800 ms
//LONG DELAY IN HERE
 2  lo0-central10.ptn-ag03.plus.net (195.166.128.192)  20.301 ms  22.958 ms  32.719 ms
 3  link-a-central10.ptn-gw01.plus.net (212.159.2.136)  19.142 ms  19.417 ms  18.527 ms
 4  xe-5-3-0.ptw-cr01.plus.net (212.159.0.108)  19.047 ms  18.781 ms  18.887 ms
 5  72.14.222.97 (72.14.222.97)  19.181 ms  19.424 ms  29.965 ms
 6  209.85.246.244 (209.85.246.244)  33.559 ms  19.756 ms  25.363 ms
 7  72.14.238.51 (72.14.238.51)  32.010 ms  19.753 ms  19.042 ms
 8  lhr08s01-in-f31.1e100.net (173.194.41.95)  19.618 ms  19.730 ms *

有没有办法让iptables路由器正确响应traceroute?

谢谢!

答案1

答案是路由器在一个物理接口上有 2 个虚拟接口。通过让 iptables 仅使用虚拟接口 eth0:0 进行路由,问题得到了解决。

相关内容