Well, actually, bind-ip allows to set ip ONLY for listen sockets, not the connecting ones. I hope that gets corrected someday, since i'm using BT here through a VPN. netstat shows listen sockets bound perfectly to the VPN interface, but BT's connecting sockets go through default interface (i.e. they're not bound before connect() is executed). I'd try to change this behaviour myself, if only i knew pyton... :-/
hemster42 has/had similar problem, i think, right here:
http://forums.degreez.net/viewtopic.php?t=2748
and as a proof:
tcp 0 0 172.31.5.1:64057 0.0.0.0:* LISTEN 7049/python
tcp 0 0 10.1.37.1:52513 x.x.x.x:6881 ESTABLISHED 7049/python
tcp 0 17 10.1.37.1:52514 x.x.x.x:14797 ESTABLISHED 7049/python
tcp 0 0 10.1.37.1:52486 x.x.x.x:6555 ESTABLISHED 7049/python
with bind-ip set to 172.31.5.1, of course (and "local ip" to public ip on the other end of VPN)
Yeah, i'm behind a NAT, that's why i use VPN.