Last modified: May 6, 2014
Contents
1 - Summary
2 - Install openvpn
3 - Install openvpn-admin
4 - Configuration files
5 - Run openvpn-admin
1 - Summary
This guide will show how to install and configure the OpenVPN client in
FreeBSD. OpenVPN is a VPN software that connects remote networks utilizing
SSL/TLS. This has been tested in FreeBSD 9.2 and 10.0 amd64.
2 - Install openvpn
Install the openvpn package.
# sudo pkg install openvpn
Password:
Find the options for the openvpn client.
# pkg info -l openvpn-2.* | grep rc.d
/usr/local/etc/rc.d/openvpn
# grep NAME_ /usr/local/etc/rc.d/openvpn
# NAME_enable="NO" # set to YES to enable openvpn
# NAME_if= # driver(s) to load, set to "tun", "tap" or "tun tap"
# NAME_flags= # additional command line arguments
# NAME_configfile="/usr/local/etc/openvpn/NAME.conf" # --config file
# NAME_dir="/usr/local/etc/openvpn" # --cd directory
# You also need to set NAME_configfile and NAME_dir, if the configuration
Edit /etc/rc.conf.local so that the openvpn client networking will be set when
the system starts up. Somewhere in the file add the following.
openvpn_if="tun tap"
# sudo vi /etc/rc.conf.local
Password:
3 - Install openvpn-admin
Install the openvpn-admin package.
# sudo pkg install openvpn-admin
Password:
Find where the openvpn-admin binary is installed.
# pkg info -l openvpn-admin-1.* | grep bin
/usr/local/sbin/openvpn-admin
Add the following entry in sudo to allow a normal user run the openvpn-admin
software.
testuser ALL=(ALL) NOPASSWD: /usr/local/sbin/openvpn-admin
# su - root
Password:
# visudo
4 - Configuration files
Find where the configuration files for different OpenVPN servers should be put.
# grep NAME_configfile /usr/local/etc/rc.d/openvpn
# NAME_configfile="/usr/local/etc/openvpn/NAME.conf" # --config file
# You also need to set NAME_configfile and NAME_dir, if the configuration
5 - Run openvpn-admin
Finally, run the openvpn-admin application.
# sudo /usr/local/sbin/openvpn-admin &
|