How to bind/assign x application to specific network adapter

all kinds of tutorials and guides. how, where, why, step-by-step stuff and more. also support for those tutorials and guides. ONLY post step-by-step guides/tutorials here OR reply with question if you have any.

How to bind/assign x application to specific network adapter

Postby Sethioz » Wed Jul 23, 2008 10:01 am

after lot of research and asking around, Luigi found a good site with tool that can do just that !
all i used to find in google was just crap and shit and stupid questions like: y u even need to do that, cant u just use the best connection for all ..etc.

so here's the site
http://www.r1ch.net/stuff/forcebindip/
and i also included the tool.

installation:
simply unrar and install. it will be installed into your system32 (dont be alerted)

usage:
now you can either use cmd or ''run''

how to use it thru run:
you simply click start - run
now type in the following command:
Code: Select all
forcebindip 0.0.0.0  "C:\Program Files\WinFtp Server\WFTPSRV.exe"

where 0.0.0.0 is the network adapter's ip (internal) - you can see it under you 'network connections' by double clicking the connection you want to use.
if the program's FULL path has spaces in it, then it has to be quated like in this example.
ah yes. and if you are stupid, ofcourse you have to put your own application path there. this is just example what i do if i wanna run my WinFTP server with it.

how to use it thru cmd:
run the command prompt window
go to the system32 folder and type in the same command:
Code: Select all
forcebindip 0.0.0.0  "C:\Program Files\WinFtp Server\WFTPSRV.exe"

if you are using wireless and your ip is dynamic you can also make application use specifc adapter instead of ip.
to do so:
open your regedit (start - run - type in 'regedit')
go to:
Code: Select all
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces

find the adapter you wanna use and copy the key. key looks something like this:
{4FA65F75-7A5F-4BCA-A3A2-59824B2F5CA0}
now use this command:
Code: Select all
forcebindip {4FA65F75-7A5F-4BCA-A3A2-59824B2F5CA0} "C:\Program Files\WinFtp Server\WFTPSRV.exe"


anyways there's a guide on their site too.

NOTE - this will not change any settings in your program. it will run a program for you with the binding. also make sure that you will CLOSE the application before using this tool. because if the application is already open it has no effect. for example on firefox, when your fox is running and you run it again thru the tool it will not be binded to the device. you have to totally CLOSE application and then run it. its very useful for game servers, for example if you want to play LAN thru hamachi you can simply bind it to hamachi adapter instead of all and game server should show up in other person's lan :)
Attachments
ForceBindIP-1.2-Setup.rar
(27.34 KiB) Downloaded 139 times
User avatar
Sethioz
Admin
Admin
 
Posts: 4753
Joined: Fri Jul 27, 2007 5:11 pm
Location: unknown

Re: How to bind/assign x application to specific network ada

Postby Sethioz » Sun Aug 05, 2012 9:23 pm

Here's small update regarding this.

works like a charm, however this time i decided to find out how to use interface, instead of IP. this is a LOT better way, because sometimes i want to test and connect into different networks with one adapter, so using ip is annoying.

In your registry, go into the following place:
Code: Select all
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\


Interface ID is whole thing, like so:
Code: Select all
{2012B79E-4234-468D-B5C7-EAA2C3E04EC2}


Here is example command:
Code: Select all
forcebindip -i {163BB79E-4234-468D-B5C7-EDC2C6E03EC8} "C:\Program Files (x86)\uTorrent\uTorrent.exe"


You can make a blah.txt file, then paste this command into it and rename it to blah.bat
You can make one .bat file for each program you need to bind and then just use .bat files.
for example i made 4 .bat files real quick.
2 for firefox and 2 for uTorrent. for ease of use, i named files:
"firefox white.bat" white is color of my USB wireless adapter, so i know which one it is, since they are both exactly same looking.

It's extremely useful if you have access to more than 1 network, since torrents just suck life out of your internet .. and who doesn't want to play play games/browse internet + download stuff ?
I would use 2 computers, but not everyone has 2 computers + running 2 computers and swapping adapters is bit annoying.


UPDATE:
win 7 = gay 7 doesn't seem to like interface usage. it needs far more testing.
It was working just fine, but then i noticed that uTorrent was using BOTH connection ...
not that its bad, its good that it can combine, but i binded it to one specific adapter. then after a while it swapped completely and started using the one that i did not bind.
So i binded again using IP and its been working fine for about 5 mins.


UPDATE2:
IP binding seem to be working fine. after about 2 hours its still using the one i binded. so adapter binding has issues on some reason.

Program Manager_2012-08-05_22-25-47.png
User avatar
Sethioz
Admin
Admin
 
Posts: 4753
Joined: Fri Jul 27, 2007 5:11 pm
Location: unknown


Return to Tutorials / Guides

Who is online

Users browsing this forum: No registered users and 1 guest