2014-02-28

OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol [2] that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (GPL).

According to Server Mom, OpenVPN allows peers to authenticate each other using a pre-shared secret key, certificates, or username/password. When used in a multi-client-server configuration, it allows the server to release an authentication certificate for every client, using signature and Certificate authority. It uses the OpenSSL encryption library extensively, as well as the SSLv3/TLSv1 protocol, and contains many security and control features.



OpenVPN Server on CentOS 6

This article will guide you through the installation and configuration steps of OpenVPN server on CentOS 6.3.

Let’s Install and Configure OpenVPN Server!

Requirements:

A Dedicated server running CentOS 6.x

Proper knowledge to use Putty and SSH protocol

Good to know:

SELinux was disabled on CentOS machine for this OpenVPN Server How To

Firewall was disabled on CentOS machine for thisOpenVPN Server How To

OpenVPN has to be in DMZ network or you need to open the necessary ports on your router – more HERE

1. Install RPMForge repository

CentOS 6 32-bit (x86):

OR

CentOS 6 64-bit (x86_64):

2. Install required packages

3. Copy the easy-rsa folder to /etc/openvpn/

4. Create the certificate

5. Build necessary CA file

You must enter the information you are asked for – bold text.

6. Build Key Server

In below case “server” after the “build-key-server” command is the name of the newly created cert file -> server.csr, server.key, server.crt. Again enter the information you are asked for – bold text. When asked for “challenge password” you can set it up or leave empty.

7. Build Diffie Hellman key

NOTE: If you want to increase Diffie Hellman key size, you must edit KEY_SIZE variable in /etc/openvpn/easy-rsa/2.0/vars to the desired size.

8. Create OpenVPN Server config file

Be sure to configure your OpenVPN server to be accessible from the internet. This can be achieved by putting OpenVPN Server in DMZ or open the necessary ports on your router – more HERE. If you have multiple network cards bind OpenVPN Server to the WAN IP address.

9. Enable IP Forwarding

Change “net.ipv4.ip_forward” parameter in /etc/sysctl.conf file from “0″ to “1″ and issue “sysctl -p” command.

10. Create OS user for VPN login

11. Start OpenVPN Server service

If you want, you can check everything is OK in /var/log/messages.

12. Windows VPN client installation

Create a server.ovpn config file. To make it easy, you can simply create it on your local computer using Notepad (or any other simple text editor tool). Enter following in that file:

Save that file in the config directory of where you installed OpenVPN client in your computer.

13. Copy ca.crt file to client

Copy ca.crt file from /etc/openvpn/easy-rsa/2.0/keys/ location on OpenVPN Server to your client and save it to the same folder as .ovpn file you created. Now you can login to your VPN using username and password you’ve created.

This is a Guest Post by @jennycorteza

Author’s Bio: Jenny Corteza is always found working on advanced techniques to improve somputer system usability. She is fond of reading information about bcp and other relevant It related topics.

Do it the easy way! Download GeekPeek.Net Install OpenVPN Server on CentOS 6 automated bash script!

Install-openvpn-server-v01

install-openvpn-server-v01.sh

Version: v01

5.1 KiB

12 Downloads
Details

GeekPeek.Net scripts - Install OpenVPN Server on CentOS 6. This script was created and tested on fresh CentOS 6.5 minimal installation with IPtables and SELinux disabled. This script installs RPMForge repository and packages necessary for OpenVPN configuration. It creates certificates, builds CA file, Key Server and Diffie Hellman. It creates OpenVPN server configuration file and enabled IP forwarding in /etc/sysctl.conf. It creates a new user on the system for VPN login. In the end it starts OpenVPN service.

Author:

info@geekpeek.net

Platforms:

Linux

License:

GNU General Public License

Date:

February 28, 2014

The post OpenVPN Server On Centos 6 appeared first on GeekPeek.Net.

Show more