Jump to content

[solved] Force network interface for outgoing connections


Jesus23

Recommended Posts

(TL;DR version at the bottom)

Hi all,

At home I have a debian server running all kinds of stuff (dns, dhcp, openvpn, etc) and recently I added µTorrent to the list of services. The setup was a breeze, I found an initscript online to have it running at boot and didn't run into any serious problems so far.

However, after a while I noticed the server began to respond slower than usual or even not at all. Apparently, this was caused by the huge number of connections µTorrent tries to make. I reduced the number of connections through the webUI and things got better, but downloads also slowed down significantly, especially when there are only a few fast peers and a lot of slower ones in the swarm.

So I figured I could reduce the load on the main NIC by adding a second one specifically for µTorrent traffic. I installed another NIC, set it up and configured µTorrent to use it by adding the following to my utserver.conf

bind_ip: 192.168.23.253
preferred_interface: eth1

So now I have the following setup:

Main NIC br0 192.168.23.254 (default, most services)

Second NIC eth1 192.168.23.253 (µTorrent)

I have configured my OS in a way that br0 is the default interface for all incoming and outgoing connections. Now, with bind_ip and preferred_interface in my utserver.conf, I would have thought that µTorrent would only use eth1 for incoming (bind_ip) and outgoing (preferred_interface) connections. However, while it now only listens on eth1 (192.168.23.253), it still makes outgoing connections on br0 (192.168.23.254), rendering my setup quite useless for reducing load on the main NIC br0.

Am I right in assuming the preferred_interface option should define which interface is used for outgoing connections and if not, is there any other way to achieve what I want?

TL;DR version:

I have a box with 2 NICs and I want to force µTorrent to use only the second (non-default) one. I have succeeded to make it only listen on the secondary interface, but outgoing connections are still made from the default, primary interface.

Thank you in advance for your response.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...