Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
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 2. Point-to-point Mode FREE CHAPTER 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 basic setup


The basic setup for OpenVPN in tap mode is almost exactly the same as in the tun mode. In tap mode, we use the following line in the server configuration file:

dev tap

While in tun mode, we use the following lines:

dev tun
topology subnet

The option topology subnet is not required, but provides a network addressing scheme that is more sensible and will be the default in a future version of OpenVPN.

For the sake of completeness, we first create the server configuration file:

proto udp
port 1194
dev tap
server 10.222.0.0 255.255.255.0

persist-key
persist-tun
keepalive 10 60

remote-cert-tls client
tls-auth /etc/openvpn/movpn/ta.key 0
dh       /etc/openvpn/movpn/dh2048.pem
ca       /etc/openvpn/movpn/movpn-ca.crt
cert     /etc/openvpn/movpn/server.crt
key      /etc/openvpn/movpn/server.key

user  nobody
group nobody

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

We will reuse this basic tap-mode server configuration file in this chapter and others. Save it as tap-udp-server.conf so...

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
Banner background image