Shut down torrent program when connected to public Wi-Fi, reconnect when joining home wireless

1

Is there a way to quit a program automatically, or stop it running, when connected to a particular Wi-Fi network?

I have µTorrent running, but want it to stop if the computer connects with the college wifi and have it be able to auto-start when connected to the Wi-Fi at home. Is this possible?

kshenoy

Posted 2012-03-15T15:02:56.837

Reputation: 113

Question was closed 2012-03-27T07:37:17.583

Which OS? How is networking configure on that OS? – evnu – 2012-03-15T16:34:08.453

Answers

2

This could probably be most easily done using firewall settings. Most firewalls allow you to specify different "zones" and then create custom rules associated with them. Since you probably are concerned about packet sniffing/bandwidth use on your college network, simply blocking uTorrent's network traffic on your college campus should be sufficient. All you would have to do is create a separate zone for your campus network, and specify a rule that will disallow all inbound and outbound traffic specifically for the uTorrent application (or, alternatively, on the ports that uTorrent uses for communication, if you want to be application-agnostic). Then you can create another zone for your home network and create a rule for that zone specifically allowing traffic for uTorrent (or on those ports).

To control starting/stopping applications, under Windows, you would have to use the Task Scheduler. You can schedule a task for starting the uTorrent application and have it trigger conditionally, only when connected to your home network. I don't believe the Task Scheduler has options to conditionally stop tasks, but it could conceivably be done if you know how to write a script or small program that sends a terminate signal to the uTorrent process, effectively instructing it to close the program, and have it run automatically when connected to your campus network.

Ben Richards

Posted 2012-03-15T15:02:56.837

Reputation: 11 662

2For the firewall solution it is even easier than that and its built right in to Windows 7. Using windows firewall you can have the firewall block/allow inbound and outbound traffic by application, instead of by port. Just set the "Domain" and "Public" profiles to block all inbound and outbound traffic to utorrent.exe, and leave "Home" unfiltered, no need to know the ports at all. – Scott Chamberlain – 2012-03-16T21:07:32.663

@ScottChamberlain Thanks. Good point. Edited that into the post. – Ben Richards – 2012-03-16T21:11:20.707