I am running automated backups with duplicity, but I need a way to execute it from a specific network interface. Right now it has 2 interfaces: eno1-> local network ( say IP is: eno2-> public (say ip is:

I need a way to have duplicity use eno2, like for example when you use ping to ping from specific interface :

ping -I eno2 google.com 

My script.sh:

PASSPHRASE="Password" duplicity --encrypt-key 000000000000000000000 --scp-command "scp -oBindAddress=" /mnt/ntfs/share/ https://Admin:Password@example/remote.php/webdav/share/

however, the scp-command "scp -oBindAddress=" doesn't work and backups are still performed through bottlenecking the entire network.

Can anyone please help me select the interface? Thanks

  • 1
    MAN page: --scp-command command Deprecated and ignored. The sftp/scp backend does no longer use an external scp client program. hardly surprising that it doesn't work.
    – Seth
    Commented Sep 25, 2019 at 11:44

1 Answer 1


normaly the traffic should be "bound" to a interface by the systems routing table. You can inspect it with the route -n command.

You can send the traffic to a IP or Network by a specific interface by adding a new entry to that routing table:

route add -host <destination ip address> metric 1024 dev eno1

  • Thank you I will definitely try this, but can I switch it for everything but lan? I want interface 1 (eno1) to be used just for lan), and anything that goes out to internet to use interface 2 (eno2). Thanks
    – Perovic
    Commented Sep 25, 2019 at 11:56
  • you can create a route for your internal network pointing to device eno1 and a "default" route to your internet gateway for eno2. If you can access your system this should already work!
    – grunix
    Commented Sep 25, 2019 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .