0

I would like it to appear to a certain program as if the network cable is unplugged, or there are no available network adapters.

The program has a relatively brief lifespan, too, so this would need to happen either just before or at the startup of the program itself.

Is this at all possible? The next best thing I can think of is just using a local VM with no assigned networking capability, but it would be nice to do this just on my machine.

4
  • Can you elaborate more on why you want to do this?
    – Zoredache
    Nov 26, 2013 at 20:05
  • 1
    Do you need to maintain network connectivity for other programs and processes? If not, then just disable the NIC before running this program and re-enable it when you're finished.
    – joeqwerty
    Nov 26, 2013 at 20:06
  • I don't suppose you're trying to block the licensing/registration mechanism of some program??
    – Chris S
    Nov 26, 2013 at 20:12
  • This is actually to discover which tests in a particular suite of tests (run from a harness which is the program in question) are hitting the network. I'm using a second computer and just disabling the adapter for now, but it would be nice if I could keep doing other work which requires the network while the tests run. Nov 26, 2013 at 21:52

2 Answers 2

4

I don't know of any way to make the program think the NIC is unplugged. But you can create a Firewall rule to disallow all communications to a program, or select communications.

0

You could potentially use something like ForceBindIP for this. But I haven't seen that used in real "netadmin" worlds...just gaming, and that was YEARS ago.

The software homepage here: http://old.r1ch.net/stuff/forcebindip/

In theory you would setup a fake nic (MS Loopback adapter for instance) or maybe just one that is already unplugged if the machine has 2 nics. Then use ForceBindIP to bind the nic to the app. But realize you have to "call" the app using the ForceBindIP command. It isn't as simple as just running the app itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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