« Back to all guides

Install OpenVPN on FreeBSD

OVPN uses shared IP addresses - which means you will be disconnected to your server if you're connected to it remotely. You will need our Public IPv4 add-on to connect remotely.

1. Run as superuser
sudo tcsh
2. Download components
pkg update && pkg install openvpn unzip
3. Download the configuration you want
4. Enter your login credentials
echo  "username"  >> /usr/local/etc/openvpn/credentials
echo "CHANGE TO YOUR PASSWORD" >> /usr/local/etc/openvpn/credentials
5. Start OpenVPN and see that everything works
openvpn --config /usr/local/etc/openvpn/ovpn.conf --daemon
6. Verify that the connection was successful

Wait about 30 seconds and then run:

curl https://www.ovpn.com/v1/api/client/ptr

You should see something like:

{"status":true,"ip":"the external ip","ptr":"PTR for the IP address"}
7. Done

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.