I want to restrict my torrenting to VPN, so that if the VPN disconnects, the torrenting stops. What's the easiest way to do that? Is there an option or plugin for Deluge, Transmission or any other client? Do I change the firewall rules?

Something like this:


I use xubuntu 13.04.