我configuration了Dante sockd通过多个IP接口转发stream量。 configuration基本上是这样的:
logoutput: /var/log/sockd.log debug: 1 socksmethod: username none internal: eth0 port = 60000 external: eth0 internal: eth0:0 port = 60000 external: eth0:0 internal: eth0:1 port = 60000 external: eth0:1 internal: eth0:2 port = 60000 external: eth0:2 ... external.rotation: same-same client pass { from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0 socksmethod: username } socks pass { from: 0.0.0.0/0 to: 0.0.0.0/0 socksmethod: username protocol: tcp udp }
与'external.rotation = same.same'禁用stream量通过服务器传递,但只能从一个地址。 当它启用时,我使用curl得到以下错误:
curl: (7) Can't complete SOCKS5 connection to xxxx:80. (3)
并在日志中的这个错误:
May 15 07:38:38 (1431689918.007569) sockd[4887]: info: block(1): tcp/accept ]: xxxx56066 yyyy60000: request was not performed due to error: could not get address to use on external side: using external.rotation = same-same, local address xxxx was selected for forwarding from our local client xxxx56066 to target zzzz80, but that local address is not set on our external interface(s). Configuration error in /etc/sockd.conf?
xxxx是我的ip地址,yyyy是服务器端地址,zzzz是目标地址。
这表明服务器希望伪装成我的地址,但它没有configuration,这是正确的,因为我希望stream量被视为来自其中有超过一百个可供select的yyyy地址。
我找不到与我看到的错误相匹配的文档中的任何内容,我怀疑有某种循环赛configuration需要,但是我也找不到。 有没有人以这种方式做这个工作?
您是否尝试启用您的操作系统的IP转发?
sysctl -w net.ipv4.ip_forward=1
要么
echo 1 > /proc/sys/net/ipv4/ip_forward
更多信息@ http://linuxconfig.org/how-to-turn-on-off-ip-forwarding-in-linux