ForceBindIP

Bind any Windows application to a specific interface or IP address

About

ForceBindIP is a freeware Windows application that will inject itself into another application and alter how certain Windows socket 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 option to bind to a specific interface.

ForceBindIP works in two stages - the loader, ForceBindIP.exe will load the target application in a suspended state. It will then inject a DLL (BindIP.dll) which loads WS2_32.DLL into memory and intercepts the bind(), connect(), sendto(), WSAConnect() and WSASendTo() functions, redirecting them to code in the DLL which verifies which interface they will be bound to and if not the one specified, (re)binds the socket. Once the function intercepts are complete, the target application is resumed. Note that some applications with anti-debugger / injection techniques may not work correctly when an injected DLL is present; for the vast majority of applications though this technique should work fine.

As of version 1.2, all known functions in WS2_32.DLL that either explicitly or implicitly bind to an interface are intercepted. Please note however that certain programs may still end up using the default interface if they implement connections that do not use the standard winsock functions. ForceBindIP is not designed to prevent information leaks (eg by forcing applications onto a VPN) - use it at your own risk for all purposes.

Some programs that have been tested to work with ForceBindIP include Quake II, Quake III, Diablo II, StarCraft, Internet Explorer, Mozilla Firefox, Google Earth, Unreal Tournament 2004 (requires -i), Netcat, Open Broadcaster Software.

Usage

ForceBindIP has no graphical user interface. You must run it from the command line, either from a cmd prompt or a shortcut. To run 'app.exe' and force it to bind to 1.2.3.4, you would run ForceBindIP as ForceBindIP 1.2.3.4 c:\full\path\to\app.exe

The full path to the target application is required; if the path contains spaces, it must be quoted. ForceBindIP can also take the GUID of an interface if for example the IP address is dynamic. To find out the GUID of your interface, run regedit and browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces. Find the interface which has the dynamic address and then copy the key name. You can then run ForceBindIP as ForceBindIP {4FA65F75-7A5F-4BCA-A3A2-59824B2F5CA0} c:\path\to\app.exe

Command line options for the target program may also appear after the path if needed.

Version 1.2 also provides an optional -i parameter. If the target application crashes on startup or exhibits other unexpected behaviour, try using -i, eg: ForceBindIP -i 1.2.3.4 c:\full\path\to\app.exe. This will cause the ForceBindIP loader to wait until the application has entered its message loop before injecting the interception DLL. Note however that any network activity the application makes prior to the DLL being loaded will not have been bound to the chosen interface.

As of version 1.3, a 64 bit build is also available - use ForceBindIP64 with 64 bit applications. Do note that even if your OS is 64 bit, many applications are still 32 bit!

Download

ForceBindIP will work on 32 and 64 bit Windows XP / Vista / 7 / 8 / 10. The Visual Studio 2015 Runtimes (x86 and x64) are required for ForceBindIP to function (the installer will let you know if they're missing).

ForceBindIP-1.31-Setup.exe (93 KiB). Setup with uninstaller.

ForceBindIP-1.31.zip (25 KiB). Zip file for manual installation. The ForceBindIP EXE and and BindIP DLL files must be installed to the same folder.

Version History

Donate

If you find ForceBindIP useful, please support my work by making a PayPal donation or a bitcoin donation. Thanks!