There’s an old guide on the FreeNAS forums but it’s way out of date and incomplete.
An updated version of the scripts referenced in the original guide can be found here (it has been forked from jedediahfrey). Read the comments first as you will need to adjust various items to suit your networking environment, the user that you have transmission running as (normally it runs as “transmission” user but this guide assumes you have changed it to “media” – why would you change it to media? Because all the other apps like Sonarr, Couchpotato, etc. run as “media” and having them all use the same user makes sharing of files much easier).
Additionally, if you want to setup port forwarding via the VPN you can use this script. Note: it assumes that you have setup a username and password on transmission. If not you are crazy as anyone with your IP will be able to administer your application remotely.
For full details and fine tuning see the last few pages of posts here.