amussey / FreeNAS-Transmission-OpenVPN

These scripts will configure Transmission (the BitTorrent client) to launch and run only through OpenVPN. They are designed to be run on top of the Transmission jail for FreeNAS.
55 stars 10 forks source link

What exactly do these scripts do? #4

Closed ovizii closed 8 years ago

ovizii commented 8 years ago

The descriptions reads:

This guide and the associated scripts will help you secure your Transmission client so it only sends traffic through a VPN.

HOW does it do this?

I see the usage of /etc/rc.d/transmissionvpn start / stop

what does that script do? I see it sets some IP, can you elaborate? What is different here from simply setting up OpenVPn and transmission without this script?

amussey commented 8 years ago

Hey @ovizii, here are the big things that this script does:

When you run make, it:

When you run /etc/rc.d/transmissionvpn start, it updates the outbound address for Transmission in /usr/pbi/transmission-amd64/etc/transmission/home/settings.json to be the VPN IP. This way, Transmission only talks through the OpenVPN connection. This was my main goal, and really the important part, of this script.

The other piece that is configured in one of the scripts fired by /etc/rc.d/transmissionvpn start are the launch parameters for OpenVPN. The --down parameters is set up so when OpenVPN goes down, Transmission shuts down. The opposite was also configured (--up), so when OpenVPN comes up, Transmission comes back up. This adds an additional failsafe to stop you from torrenting over a non-VPN'd connection.

This definitely isn't the only (or even the best) way to accomplish forcing all of Transmission's traffic through OpenVPN - something like firewall rules could be even mores secure - but my goal was to make something relatively quick and easy to install.

I hope this helps!

ovizii commented 8 years ago

That makes so much sense now that you explained it, thanks!