I'm trying to do the exact same thing as OP and when you google "FreeNAS openvpn client" this is the FIRST thing to come up, so I read it, and garm's responses made me so mad I had to make an account just to post the *CORRECT* answer.
You want to set up a jail and install OpenVPN, there is proabobly several threads on this already, if not a resource.
FreeNAS isn’t Linux.. it’s FreeBSD. The distinction matters.
This is the first thing when you google it, so might as well have the freaking CORRECT answer in here.... and for F sake garm, NO the difference between BSD and linux is NOT important for *this* question, get off your high horse.
This was literally the most unhelpful response in all of the internet.
FreeNAS 11 has the openvpn client built in with the base install, don't make a jail, that sounds like a freaking nightmare for what you are actually trying to do.
To get the client to auto start simply move the ovpn config somewhere on the box and test it out with, if there are any errors don't forget to check the SERVER logs for hints as to why it's not working.
Code:
openvpn --config your_config_file.ovpn
once you get this working go to Tasks -> Init/Shutdown Scripts and add a new startup command. Everything here needs to be absolute paths, so the command will look something like
Code:
/usr/local/sbin/openvpn --config /absolute/path/to/config.ovpn&
and that trailing & is important because the openvpn command line client doesn't return once the VPN tunnel is established and will halt your boot process when the command executes.