Set the temporary directory for the packages, as well as the site to fetch packages from (if you are installing onto a 32 bit system change “amd64″ to “i386″):
setenv PKG_TMPDIR /mnt/Data/Extensions/tmp/
setenv PACKAGESITE "http://ftp6.us.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-9.0-release/Latest/"
Move openvpn file so it does not get executed every time when system is being started, otherwise your boot process will get stopped and you will be asked for a username/password. NAS4Free executes all the files inside "rc.d" folder on startup.
mv /usr/local/etc/rc.d/openvpn /usr/local/etc/openvpn/
Download your certificates *.crt as well as *.ovpn , rename them to *.crt->openvpn.crt and *.ovpn->openvpn.conf copy them using WinSCP to /usr/local/etc/openvpn/
Once copied edit the openvpn.conf and you should see something like that:
remote 188.8.131.52 443 # - Your server IP and OpenVPN Port
Just make sure after "ca" there is openvpn.crt, also check the 2nd line if you have got dev tun or dev tap
Test OpenVPN connection:
/usr/local/etc/openvpn/openvpn onestart /usr/local/etc/openvpn/openvpn.conf
Download the following torrent to make sure your legal torrents are downloaded privately:
Edit rc.conf to enable OpenVPN. Open up your NAS' web interface and head to System > Advanced > rc.conf and add the following variables:P
openvpn_enable with a value of YES
openvpn_if with a value of tun or tap depending on the contents of openvpn.conf
Now we need to make it autostart, so back to SSH:
pkg_add -r expect
In the file just insert:
set force_conservative 0
spawn /usr/local/etc/openvpn/openvpn start /usr/local/etc/openvpn/openvpn.conf
expect -exact "Enter Auth Username:"
send -- "YOUR USERNAME!\r"
expect -exact "Enter Auth Password:"
send -- "YOUR PASSWORD!\r"
Save your changes and make that script executable by running the following command:
chmod +x autosignon
In NAS4Free webGUI, navigate to: “System|Advanced|Command scripts” and insert the following start-up command (PreInit):
So this is a bit hit or miss for me, I almost feel like I am having to restart my NAS4Free box before I see the changes from the firewall applied. My VPN provider doesn't have a list anymore for which IPs they assign, so I just have to kinda guess. The purpose of the firewall is to provide detection if the event of the VPN service going down, and by protection we mean - no external connection.
9/15/2014 Update: CHange torrent IP tracking address.