/sc_assets/244/logo.png

FreeNAS OpenVPN Client Setup

Last updated by Shayne M on April 05, 2017 21:36

1. (Optional) Create jail

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.

2. Enable SSH

In the menu, click on Services. Make sure SSH is On. In the left menu, click on Services -> SSH. Make sure you allow password login for root.

3. SSH to the NAS

Use a SSH client to SSH to your NAS. If you're on Windows, we suggest Putty. If you're on OS X or Linux, use the terminal.

4. Enter the jail (if created)

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
5. Download components
 pkg update && pkg upgrade && pkg install bash openvpn unzip curl
6. Exit and re-enter jail (if created)
exit
jexec REPLACE WITH THE JID tcsh
7. Enable auto start
echo 'openvpn_enable="YES"' >> /etc/rc.conf<br>echo 'openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"' >> /etc/rc.conf
8. Download the configuration you want

You need to be logged in to the members area and download generate the key files and the configuration files. Members area

9. Enter your login credentials
echo "CHANGE TO YOUR PASSWORD" >> /usr/local/etc/openvpn/credentials 
echo "askpass /usr/local/etc/openvpn/credentials" >> /usr/local/etc/openvpn/openvpn.conf
10. Start OpenVPN and see that everything works
/usr/local/etc/rc.d/openvpn start
11. Verify that the connection was successful

Wait about 30 seconds and then run:

curl https://ipinfo.io

You should see something like:

{
  "ip": "168.1.66.228",
  "hostname": "e4.42.01a8.ip4.static.sl-reverse.com",
  "city": "Melbourne",
  "region": "Victoria",
  "country": "AU",
  "loc": "-37.8103,144.9544",
  "org": "AS36351 SoftLayer Technologies Inc.",
  "postal": "3000"
}
12. Done

Congratulations! Your device is now protected behind VPNSecure and will automatically connect on reboots. If you encountered any issues, please send the log file (/tmp/openvpn.log) to our support.

VPNSecure Provides Secure VPN servers in over 45+ Countries

If you are a looking for a versatile easy to use VPN service, checkout Today