Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering OpenVPN

You're reading from   Mastering OpenVPN Master building and integrating secure private networks using OpenVPN

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher Packt
ISBN-13 9781783553136
Length 364 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Eric F Crist Eric F Crist
Author Profile Icon Eric F Crist
Eric F Crist
Jan Just Keijser Jan Just Keijser
Author Profile Icon Jan Just Keijser
Jan Just Keijser
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction to OpenVPN FREE CHAPTER 2. Point-to-point Mode 3. PKIs and Certificates 4. Client/Server Mode with tun Devices 5. Advanced Deployment Scenarios in tun Mode 6. Client/Server Mode with tap Devices 7. Scripting and Plugins 8. Using OpenVPN on Mobile Devices and Home Routers 9. Troubleshooting and Tuning 10. Future Directions Index

The complete setup

Based on the previous examples, we can now construct a complete production-level setup using configuration files, including routing, logging, IPv6 support, as well as a few other production features that OpenVPN offers.

Consider the following network layout:

The complete setup

For the server, we create the following configuration file movpn-02-02-server.conf:

dev tun
proto udp
local  openvpnserver.example.com
lport  1234
remote openvpnclient.example.com
rport  4321

secret secret.key 0
ifconfig 10.200.0.1 10.200.0.2
route 192.168.4.0 255.255.255.0

tun-ipv6
ifconfig-ipv6 2001:610:120::200:0:1 2001:610:120::200:0:2

user  nobody
groupnobody  # use 'group nogroup' on Debian/Ubuntu
persist-tun
persist-key
keepalive 10 60
ping-timer-rem

verb 3
daemon
log-append /var/log/openvpn.log

For the client, we create the file movpn-02-02-client.conf:

dev tun
proto udp
local  openvpnclient.example.com
lport  4321
remote openvpnserver.example.com
rport  1234

secret secret.key 1
ifconfig 10.200.0...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime