On 04/22/2013 01:54 PM, staticsafe wrote:
> On 4/22/2013 13:51, Nilesh Govindrajan wrote:
>> On Apr 22, 2013 11:14 PM, "staticsafe" <m...@staticsafe.ca> wrote:
>>>
>>> On 4/22/2013 13:18, Nilesh Govindrajan wrote:
>>>> Hi,
>>>>
>>>> I'm looking for a torrent client which can listen to an interface
>> instead
>>>> of ips. Any pointers?
>>>>
>>>
>>> I don't understand, why would a torrent *client* listen on anything?
>>>
>>> --
>>> staticsafe
>>> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>>> Please don't top post - http://goo.gl/YrmAb
>>> Don't CC me! I'm subscribed to whatever list I just posted on.
>>>
>>
>> Torrent clients listen for peers on a port. It always picks the default
>> interface or route. It becomes a problem when you have two Internet
>> connections.
>>
> Oh right. I don't think any clients allow you to specify an interface.
> Only IPs and ports.
> 
> Like in rtorrent:
>   -b <a.b.c.d>      Bind the listening socket to this IP
>   -i <a.b.c.d>      Change the IP that is sent to the tracker
>   -p <int>-<int>    Set port range for incoming connections
> 

Indeed. In fact, what Nilesh is asking for isn't (to my knowledge)
possible. You can only specify IP addresses to listen to. What's
listened to then depends on which interfaces have that IP.

I.e. I have a machine with two NICs[1], and the same IP on each NIC. If
I tell a program to listen to that IP, it will receive packets sent to
that IP seen by either NIC. If I remove that IP from one of those NICs,
it will only see packets sent to that IP on the remaining NIC. If I add
another NIC, no packets will be seen by the program until I add the IP
to that NIC.

What Nilesh probably wants to do is have the program listen on all IPs
(so, 0.0.0.0 for IPv4, or [::] for IPv6), and then cover his butt with
firewall rules.

[1] Not a hypothetical; this is a real system.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to