嗯, 准确的说, 如果 iptables -t nat 吃掉了 lo 的包 (MASQUERADE 之类的), Google TalkPlugin 就会傲娇掉, 具体表现为无论刷新重装多少次, 都提示没有连接, 网上介绍的各种方法都无效.
[006:450] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin
[006:450] Waiting for GoogleTalkPlugin to start...
[007:451] Read port file, port=52545
[007:453] Initiated connection to GoogleTalkPlugin
[007:551] Socket connection established
[007:551] ScheduleOnlineCheck: Online check in 5000ms
[007:552] Warning(clientchannel.cc:669): Connection lost while waiting for authorization reason=0
[012:567] HandleOnlineCheck: Starting check
[012:567] Warning(clientchannel.cc:778): Not connected; restart already tried, giving up
简单举例, 引起问题的会吃掉 lo 的包的规则如:
-A POSTROUTING -j MASQUERADE
如果想尽量保持原语句正常功能, 而仅仅排除掉 lo 的包, 可以用:
-A POSTROUTING ! -o lo -j MASQUERADE
-A POSTROUTING -o ‘!lo’ -j MASQUERADE
注意: 网上各种教程都玩坏了, ! 和 lo 之间不能有空格, 且用单引号以防止被转义.
更新: ‘!lo’ 也是错的!!!
当然如果能指定 -o eth0 什么更准确的当然最好啦 🙂