Installing and Configuring OpenVPN Server on CentOS using Webmin (part 2)
Installing OpenVPN Server
In my configuration, I use CentOS 5.3 with 1 CPU 2.8 GHz, 2 GB RAM, 40 GB HD, and one NIC as the server. To make it easier when installing OpenVPN, I use RPMForge repository. First I need to download rpmforge release package then install it.
[root@alambil ~]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm [root@alambil ~]# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
Then I use yum to install OpenVPN packages.
[root@alambil ~]# yum install openvpn Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * rpmforge: apt.sw.be * base: mirror.nus.edu.sg * updates: mirror.nus.edu.sg * addons: mirror.nus.edu.sg * extras: mirror.nus.edu.sg rpmforge | 1.1 kB 00:00 primary.xml.gz | 2.3 MB 00:23 rpmforge 10740/10740 Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package openvpn.i386 0:2.1.4-2.el5.rf set to be updated --> Processing Dependency: liblzo2.so.2 for package: openvpn --> Processing Dependency: lzo for package: openvpn --> Processing Dependency: libpkcs11-helper.so.1 for package: openvpn --> Running transaction check ---> Package lzo.i386 0:2.04-1.el5.rf set to be updated ---> Package pkcs11-helper.i386 0:1.08-1.el5.rf set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: openvpn i386 2.1.4-2.el5.rf rpmforge 443 k Installing for dependencies: lzo i386 2.04-1.el5.rf rpmforge 131 k pkcs11-helper i386 1.08-1.el5.rf rpmforge 128 k Transaction Summary ================================================================================ Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 701 k Is this ok [y/N]: y Downloading Packages: (1/3): pkcs11-helper-1.08-1.el5.rf.i386.rpm | 128 kB 00:01 (2/3): lzo-2.04-1.el5.rf.i386.rpm | 131 kB 00:02 (3/3): openvpn-2.1.4-2.el5.rf.i386.rpm | 443 kB 00:06 -------------------------------------------------------------------------------- Total 40 kB/s | 701 kB 00:17 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : pkcs11-helper [1/3] Installing : lzo [2/3] Installing : openvpn [3/3] Installed: openvpn.i386 0:2.1.4-2.el5.rf Dependency Installed: lzo.i386 0:2.04-1.el5.rf pkcs11-helper.i386 0:1.08-1.el5.rf Complete! [root@alambil ~]#
The next step is to download and install webmin. We can get webmin source from http://www.webmin.com/download.html and then install it.
[root@alambil ~]# rpm -Uvh webmin-1.550-1.noarch.rpm
Default Webmin package do not contain module to administer OpenVPN. I need to download a Webmin OpenVPN Admin module and add it to my Webmin installation.
I get Webmin OpenVPN Admin module from http://www.webmin.com/cgi-bin/search_third.cgi?search=openvpn Download openvpn-2.5.wbm.gz file and extract it.
[root@alambil ~]# gunzip openvpn-2.5.wbm.gz
To add this module to the webmin installation, we need to log on to Webmin.
Using the browser, go to the servers ip and port 10000: https://10.180.1.10:10000. After succesfully logon, go to menu Webmin -> Webmin Configuration and click on Webmin Modules.
In the webmin modules page, click on From local file and browse for the openvpn-2.5.wbm that have been extracted from the gz file then click Install Module.
After the installation finished, OpenVPN + CA menu will be listed in the Servers Menu.
Now, we have installed all the components needed for the OpenVPN configuration.
In the next section, I will discuss about the OpenVPN configuration.