I have configured Dante sockd to forward traffic through multiple IP interfaces. The config is basically this:
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
}
With 'external.rotation = same.same' disabled traffic is passed through the server but only goes out of one address. When it's enabled, I get the following error using curl:
curl: (7) Can't complete SOCKS5 connection to x.x.x.x:80. (3)
and this error in the logs:
May 15 07:38:38 (1431689918.007569) sockd[4887]: info: block(1): tcp/accept ]: x.x.x.x.56066 y.y.y.y.60000: request was not performed due to error: could not get address to use on external side: using external.rotation = same-same, local address x.x.x.x was selected for forwarding from our local client x.x.x.x.56066 to target z.z.z.z.80, but that local address is not set on our external interface(s). Configuration error in /etc/sockd.conf?
x.x.x.x is my ip address, y.y.y.y is the server side address and z.z.z.z is the destination address.
That suggests to me that the server expects to masquerade as my address but that it's not configured, which is correct as I want traffic to be seen as coming from the y.y.y.y address where there are over a hundred of them to choose from.
I can't find anything in the documentation that matches the error I'm seeing and I suspect that there is some kind of round robin config needed but I can't find that either. Has anyone made this work in this way?