Bind interface for upload : scp works, not rsync

bindingsrsyncscp

I need to upload file on a specific interface.
This cannot be set-up via iptables, because my script output on several interfaces.

this is working fine :

scp -oBindAddress=192.168.100.1 ...

but

rsync --address=192.168.100.1

is still sending on eth0 (192.168.10.1)

how could I force rsync to use 192.168.100.1 ?

any idea ?

Best Answer

rsync can be told what SSH options to use with the "-e" switch.

Try something like:

rsync -e 'ssh -oBindAddress=192.168.100.1'