Book Image

OpenVPN: Building and Integrating Virtual Private Networks

Book Image

OpenVPN: Building and Integrating Virtual Private Networks

Overview of this book

OpenVPN is a powerful, open source SSL VPN application. It can secure site-to-site connections, WiFi and enterprise-scale remote connections. While being a full-featured VPN solution, OpenVPN is easy to use and does not suffer from the complexity that characterizes other IPSec VPN implementations. It uses the secure and stable TLS/SSL mechanisms for authentication and encryption. This book is an easy introduction to this popular VPN application. After introducing the basics of security and VPN, the book moves on to cover using OpenVPN, from installing it on various platforms, through configuring basic tunnels, to more advanced features, such as using the application with firewalls, routers, proxy servers, and OpenVPN scripting. While providing only necessary theoretical background, the book takes a practical approach, presenting plenty of examples.
Table of Contents (17 chapters)
OpenVPN
Credits
About the Author
About the Reviewers
Preface
Index

Configuring OpenVPN to Use Certificates


Open the configuration file in your favorite editor; of course you may also use Notepad:

All you have to do here is put # in front of the entry secret key.txt, which we adapted in our last chapter, and add the following five entries:

Entry in config file

Function

tls-server

OpenVPN will run in TLS-server mode (on a client you will have to add TLS-client)

dh keys/dh2048.pem

Use the Diffie-Hellman key stored in keys/dh2048.pem

ca keys/ca.crt

Use the CA certificate in keys/ca.crt

cert keys/VPN-Server.crt

Use my certificate in keys/VPN-Server.crt

key keys/VPN-Server.key

Use my key in keys/VPN-Server.key

In my test-bed network, where the local net is 10.10.10.0/24, and the tunnel network is 10.3.0.0/24, the simplest possible configuration file (C:\\ProgramFiles\OpenVPN\config\sample.ovpn on Windows) for an X509-enabled OpenVPN server is:

dev tap
ifconfig 10.3.0.1 255.255.255.0
tls-server
dh keys/dh2048.pem
ca keys/ca.crt
cert keys/VPN-Server...