Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Suppose network interface 1 (net1) and 2 (net2) are both connected to the Internet. I want application 1 (app1) to use net1, and application 2 (app2) to use net2. How can it be done under Windows?

If you need a concrete example of the above situation, consider:

  • A laptop with Windows 7
  • net1 = A wired connection to a Verizon Internet modem
  • net2 = A wireless connection to a Comcast Internet modem
  • app1 = Internet Explorer
  • app2 = Firefox
  • I'd like to have "IE use Verizon but not Comcast", and "Firefox use Comcast but not Verizon"

It doesn't have to be done via the routing table. If you've other ideas, please let me know!

share|improve this question

4 Answers 4

up vote 4 down vote accepted

Sounds like ForceBindIP is what you're looking for :)

ForceBindIP - Bind any Windows application to a specific interface

ForceBindIP is a freeware Windows application that will inject itself into another application and alter how certain Windows Sockets calls are made, allowing you to force the other application to use a specific network interface / IP address. This is useful if you are in an environment with multiple interfaces and your application has no such option for binding to a specific interface.

Some programs that have been tested to work with ForceBindIP include DC++, uTorrent, Quake II, Quake III, Diablo II, StarCraft, Internet Explorer, Mozilla Firefox, Google Earth, Infantry, Real Player, Unreal Tournament 2004 (requires -i), Outlook 2000 (requires -i). Programs that do not work include GetRight (anti-debugger / forking techniques), WinCVS (forks cvs.exe)

You can simply make shortcuts to launch the application using ForceBindIP, with the IP address and program as arguments:

alt text

ForceBindIP is freeware.

share|improve this answer
    
Great software! Unfortunately it doesn't seem to work with my VPN setup (which has "use default gateway on remote network" disabled so that connection to the Internet won't go through it). I tried to bind IE to the VPN interface (PPP adapter), but the traffic still doesn't go through the VPN (checked with whatismyip.com) –  netvope Feb 27 '10 at 19:51

No need to run vmware player and all that. Just enable weakhostreceive on the secondary adapter (i.e. the adapter which has a higher metric).

Then you can run squid and set squid to use tcp_outgoing_address to the ip address of the secondary adapter and proxy all your applications.

I suspect forcebindip should also start working.

What I think is there is a bug in the MS win7 stack. When a packet arrives on the secondary adapter it gets discarded even though it is a valid packet.

Enabling weakhost receive is documented here http://technet.microsoft.com/en-us/magazine/2007.09.cableguy.aspx

netsh interface ipv4 set interface [InterfaceNameOrIndex] weakhostsend=enabled|disabled

netsh interface ipv4 set interface [InterfaceNameOrIndex] weakhostreceive=enabled|disabled

netsh interface ipv6 set interface [InterfaceNameOrIndex] weakhostsend=enabled|disabled

netsh interface ipv6 set interface [InterfaceNameOrIndex] weakhostreceive=enabled|disabled
share|improve this answer

i'm pretty sure this is impossible. The closest thing you can get sending traffic on one interface or another is though subnets and routing entries.

But if two applications want to talk on the network, they use the same network.

Technically, i suppose, an application could bind its outgoing traffic to a particular interface, but the app would have to be re-written to do that.

share|improve this answer

Had a similar requirement, wanted specific applications to go via specific internet connections but couldn't be done via IP or Port.

My solution was to:

(Note my computer ip is x.x.x.100

a) setup a mangle rule for x.x.x.101 to go via wan2

b) run vmware player with a copy of ubuntulite (with openssh installed) on ip x.x.x.101

c) use "proxifier" to bind the application and force it tunnel via the vmware machine, which in turn was routed only via wan2

This is the only (very haxy) way I could figure how to do it on an application level (proxifier has a trial version you can test and runs on windows 7 x64).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.