Downloading on a p2p network without a VPN can be dangerous now that we all know how torrents are ridiculously monitored.
On Ubuntu distributions, Transmission is the default installed torrent client.
You can run the following script to be sure that whenever your vpn dies, Transmission will be killed and such avoiding exposing
your real ip anytime.
OpenVPN uses a tunnel tun0 but if you use other protocols like PPTP or SSTP, be sure to update the script accordingly.
Connect your vpn and run ifconfig to show your network interfaces.