If you want OpenVPN to run in a jail, you must first create one. If you already have jail, or don't want to use it go to step 2.
Go to the FreeNAS GUI. In the menu, click on Jail → Add Jail. Enter ovpn as the name for the jail.
SSH:ing into your FreeNAS server with the root account is disabled by default. You will therefore have to create a new user. In the menu, click on Accounts → Users. Click on ADD and fill out the form. Check the box to permit sudo on the account.
In the menu, click on Services. Make sure SSH is On. In the left menu, click on Services → SSH.
All the hardware used to operate OVPN is owned by us. All VPN servers operate without hard drives as the operating system only resides in RAM.
Learn moreUse a SSH client to SSH to your NAS. If you're on Windows, we suggest Putty. If you're on macOS or Linux, use the terminal.
If you're using a jail, we now need to enter it. Write:
jls
Locate the JID for the jail you want. The name for the jail is under the Hostname column.
jexec REPLACE WITH THE JID tcsh
If you're using a jail, we now need to enter it. Write:
jls
sudo su -
echo 'openvpn_enable="YES"' >> /etc/rc.conf && echo 'openvpn_enable="YES"' >> /conf/base/etc/rc.conf
echo 'openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"' >> /etc/rc.conf && echo 'openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"' >> /conf/base/etc/rc.conf
echo "CHANGE TO YOUR USERNAME" >> /usr/local/etc/openvpn/credentials
echo "CHANGE TO YOUR PASSWORD" >> /usr/local/etc/openvpn/credentials
cp /usr/local/etc/openvpn/credentials /conf/base/etc/local/openvpn/credentials
/usr/local/etc/rc.d/openvpn start
Wait about 30 seconds and then run:
curl https://www.ovpn.com/v2/api/client/ptr
You should see something like:
{"status":true,"ip":"the external ip","ptr":"PTR for the IP address"}
Congratulations! Your device is now protected behind OVPN and will automatically connect on reboots. If you encountered any issues, please send the log file (/tmp/openvpn.log) to our support.
In case the connection was not set up properly when you verified it in the previous step, please send us the OpenVPN log so we can assist. You can retrieve it by writing:
sudo -i
cat /tmp/openvpn.log
You can also check if OpenVPN is running properly by writing:
ps aux | grep openvpn
Special Offer: Save $144 on our annual subscription
View pricing