Chapter 7. Configuring openvpn

Revision History
Revision 0.12005-03-20KP
Initial document
Revision 0.22005-04-06ET
Minor corrections and added instructions on starting openvpn
Revision 0.32005-04-27KP
Some more corrections and notes

Table of Contents

Introduction
Objectives
Overview of the setup described here
About openvpn
Loading the packages
Loading the modules
Generating keys
Setup for key generation on your Bering-uClibc box
Build your own Root Certification Authority (CA) certificate/key
Build Diffie-Hellmann parameters
Build the server key
Build the client key(s)
OpenVPN server side
OpenVPN server configuration
Configure shorewall on the openvpn server
Starting the OpenVPN server
OpenVPN clients
OpenVPN client configuration
Configure shorewall on an OpenVPN client
Starting the OpenVPN client
Links
OpenVPN links
OpenSSL tools and hints to how to create your own Certificates

Introduction

Objectives

This chapter describes how to configure your LEAF system(s) to build Virtual Private Networks (VPN) with OpenVPN.

Overview of the setup described here

The setup described here assumes you are using openvpn 2.x in server/client mode. Furthermore the setup used for this chapter is based on LEAF systems connected to the internet via dynamic IP's. It will be similar, but easier, to build VPN's between LEAF systems with a fixed IP or a mixed environment.

We also had in mind to tunnel the subnets behind the LEAF routers. Connecting one or more road-warriors should be easier again.

Additionally only routing (using the TUN interface) between subnets is described, for bridging (using the TAP interface), the differences to routing and advantages/disadvantages of tunneling or bridging please read the according Openvpn documentation.

In our example OpenVPN setup, openvpn uses lzo compression and the keys (esp.the CA authority) are build and stored on the LEAF router.

Note

Following the description about creating keys may impose security risks! It's only useful to help you to start with openvpn, in no way it's meant to be used in a production environment.

About openvpn

OpenVPN is a full-featured SSL VPN solution which can accomodate a wide range of configurations, including road warrior access, home/office/campus telecommuting, WiFi security, secure branch office linking, and enterprise-scale remote access solutions with load balancing, failover, and fine-grained access-controls.

Compared with ipsec implemenations like freeswan/openswan it's easier to setup, supports dynamic IP addresses out of the box and doesn't need any kernel patches.