Page 1 of 1

Stopping all Traffic with Command?

Posted: Sun Jun 19, 2016 9:27 pm
by viking
I am running Deluge Daemon.
I have a script that brings up an alarm when my VPN is no longer active. When this happens, I also want to stop all Deluge Daemon traffic (i.e. down and uploads).
Is there a command, e.g from the command prompt, that I can use to stop and then start the traffic?

Re: Stopping all Traffic with Command?

Posted: Sun Jun 19, 2016 9:35 pm
by gderf
Best practice would be to kill Deluge entirely when the VPN dies. There are applications that can do this for you such as VPNetMon:

http://vpnetmon.webs.com/

This app can also be configured to restart Deluge when the VPN comes back up, but I would be very careful with that option.

Re: Stopping all Traffic with Command?

Posted: Mon Jun 20, 2016 1:23 am
by viking
Thank you for your response;
I already have a Kill switch in my VPN. hover sometimes the VPN manager shuts down randomly.
Most VPN monitors monitors the IP address of the VPN which often changes so that is not a good option for me.

I have my own monitor that checks if the VPN manager is running, and if not, it can take action.

The question, was how to stop the traffic by command. I can kill Deluge by command prompt (in the same way as I kill it from task manager or by one of the VPN monitor programs). However, when I do this, it causes a problem when restarting Deluge; it needs to check all files that were open when the Deluge was killed.

Isn't there a "gentler" way of stopping Deluge Traffic w/o corrupting the file status?

Re: Stopping all Traffic with Command?

Posted: Mon Jun 20, 2016 9:22 am
by Cas
You don't say exactly how you are killing the process but force killing would cause issues. Are you doing as described here:

http://www.howtogeek.com/145882/how-to- ... n-windows/

Re: Stopping all Traffic with Command?

Posted: Mon Jun 20, 2016 5:11 pm
by viking
The problem arise when I kill the task from task manager. Wouldn't:

Code: Select all

tskill deluged.exe
also cause issues?

Re: Stopping all Traffic with Command?

Posted: Tue Jun 21, 2016 10:03 am
by Cas
End task in task manager shouldn't force kill as far as i am aware.

The kill command (without extra options) requests a standard shutdown of deluged.

Re: Stopping all Traffic with Command?

Posted: Tue Jun 21, 2016 10:25 am
by viking
I was able to create a rule-set in (free) Comodo Firewall; Deluge traffic is only allowed as long as the VPN is running (regardless of IP address).
Works great :-).