<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://72.14.177.54/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://72.14.177.54/SFVLUG/?action=history&amp;feed=atom&amp;title=How_To_Configure_OpenVPN</id>
		<title>How To Configure OpenVPN - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://72.14.177.54/SFVLUG/?action=history&amp;feed=atom&amp;title=How_To_Configure_OpenVPN"/>
		<link rel="alternate" type="text/html" href="http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;action=history"/>
		<updated>2026-04-08T16:14:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.15.1</generator>

	<entry>
		<id>http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2945&amp;oldid=prev</id>
		<title>Jeff at 23:23, 21 February 2016</title>
		<link rel="alternate" type="text/html" href="http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2945&amp;oldid=prev"/>
				<updated>2016-02-21T23:23:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;amp;diff=2945&amp;amp;oldid=2944&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Jeff</name></author>	</entry>

	<entry>
		<id>http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2944&amp;oldid=prev</id>
		<title>Jeff:&amp;#32;/* Configure The Server */</title>
		<link rel="alternate" type="text/html" href="http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2944&amp;oldid=prev"/>
				<updated>2016-02-21T22:56:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Configure The Server&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;amp;diff=2944&amp;amp;oldid=2943&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Jeff</name></author>	</entry>

	<entry>
		<id>http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2943&amp;oldid=prev</id>
		<title>Jeff:&amp;#32;/* TUN And TAP Networking */</title>
		<link rel="alternate" type="text/html" href="http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2943&amp;oldid=prev"/>
				<updated>2016-02-21T21:38:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;TUN And TAP Networking&lt;/span&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:38, 21 February 2016&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;TUN&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;TUN&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: A tun interface operates at layer 3.&amp;nbsp; This means it can encapsulate packets at the IP address layer.&amp;nbsp; Use a tun &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;inter\&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: A tun interface operates at layer 3.&amp;nbsp; This means it can encapsulate packets at the IP address layer.&amp;nbsp; Use a tun &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;interface &lt;/ins&gt;if you want to route packets between VPN endpoints.&amp;nbsp; That means both sides of the VPN will use different IP &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;address &lt;/ins&gt;spaces and use the VPN to route between the two networks.&amp;nbsp; This tutorial will be using the tun interface.&amp;nbsp; It is also worth mentioning that OpenBSD only supports tun interfaces.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;face &lt;/del&gt;if you want to route packets between VPN endpoints.&amp;nbsp; That means both sides of the VPN will use different IP &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;addres\&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;s &lt;/del&gt;spaces and use the VPN to route between the two networks.&amp;nbsp; This tutorial will be using the tun interface.&amp;nbsp; It is also&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;\&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;worth mentioning that OpenBSD only supports tun interfaces.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;TAP&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;TAP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: A tap interface operates at layer 2.&amp;nbsp; This means it can encapsulate entire ethernet frames.&amp;nbsp; Use a tap interface when&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;\&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: A tap interface operates at layer 2.&amp;nbsp; This means it can encapsulate entire ethernet frames.&amp;nbsp; Use a tap interface when you want to bridge packets between VPN endpoints.&amp;nbsp; That means packets on either side of the VPN will be from the same address space.&amp;nbsp; Hopefully that will mean you can avoid NAT, if both sides of the VPN have all unique addresses.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;you want to bridge packets between VPN endpoints.&amp;nbsp; That means packets on either side of the VPN will be from the same &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;\&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;address space.&amp;nbsp; Hopefully that will mean you can avoid NAT, if both sides of the VPN have all unique addresses.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== X.509 Certificates ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== X.509 Certificates ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-08 16:14:47 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jeff</name></author>	</entry>

	<entry>
		<id>http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2942&amp;oldid=prev</id>
		<title>Jeff:&amp;#32;Created page with 'Setting up and running OpenVPN is pretty easy.  You just have to understand a couple principles and set up the certificates.  So let's start with the basics.  == TUN And TAP Netw…'</title>
		<link rel="alternate" type="text/html" href="http://72.14.177.54/SFVLUG/?title=How_To_Configure_OpenVPN&amp;diff=2942&amp;oldid=prev"/>
				<updated>2016-02-21T21:36:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;Setting up and running OpenVPN is pretty easy.  You just have to understand a couple principles and set up the certificates.  So let&amp;#39;s start with the basics.  == TUN And TAP Netw…&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Setting up and running OpenVPN is pretty easy.  You just have to&lt;br /&gt;
understand a couple principles and set up the certificates.  So let's&lt;br /&gt;
start with the basics.&lt;br /&gt;
&lt;br /&gt;
== TUN And TAP Networking ==&lt;br /&gt;
&lt;br /&gt;
Running OpenVPN requires you to either set up a TUN or TAP network&lt;br /&gt;
interface.  These are both fairly similar but there is a critical&lt;br /&gt;
difference and I'll try to explain it as best as I can.&lt;br /&gt;
&lt;br /&gt;
You can think of both of these as network interfaces that are attached&lt;br /&gt;
to a program in userspace.  With them, the program is able to interact&lt;br /&gt;
with the rest of the network as if it were its own node on the&lt;br /&gt;
network.  In the case of OpenVPN, this is very useful because it&lt;br /&gt;
allows OpenVPN to send encrypted packets over your real network&lt;br /&gt;
interface, but it encrypts and decrypts packets entering or leaving&lt;br /&gt;
the tun or tap interface.  So OpenVPN gets to manipulate the&lt;br /&gt;
cryptography around the packets on its tun or tap interface and use&lt;br /&gt;
the machine's real interface for sending the packets just like any&lt;br /&gt;
other client or server program.&lt;br /&gt;
&lt;br /&gt;
;TUN&lt;br /&gt;
: A tun interface operates at layer 3.  This means it can encapsulate packets at the IP address layer.  Use a tun inter\&lt;br /&gt;
face if you want to route packets between VPN endpoints.  That means both sides of the VPN will use different IP addres\&lt;br /&gt;
s spaces and use the VPN to route between the two networks.  This tutorial will be using the tun interface.  It is also\&lt;br /&gt;
 worth mentioning that OpenBSD only supports tun interfaces.&lt;br /&gt;
;TAP&lt;br /&gt;
: A tap interface operates at layer 2.  This means it can encapsulate entire ethernet frames.  Use a tap interface when\&lt;br /&gt;
 you want to bridge packets between VPN endpoints.  That means packets on either side of the VPN will be from the same \&lt;br /&gt;
address space.  Hopefully that will mean you can avoid NAT, if both sides of the VPN have all unique addresses.&lt;br /&gt;
&lt;br /&gt;
== X.509 Certificates ==&lt;br /&gt;
&lt;br /&gt;
We have all heard of SSL certificates.  They are the implementation of&lt;br /&gt;
the X.509 protocol.  Let's look at what we need.&lt;br /&gt;
&lt;br /&gt;
When seting up OpenVPN, I create my own Certificate Authority (CA).&lt;br /&gt;
This is just a self-signed certificate with a very long expiration&lt;br /&gt;
period.  In general, generating any X.509 results in three files.&lt;br /&gt;
First, there is the private key.  This is a secret file which contains&lt;br /&gt;
some important random numbers.  Second, from this file I generate what&lt;br /&gt;
is called a Certificate Signing Request (sometimes a CSR or req file).&lt;br /&gt;
The CSR is an unsigned public key, it contains no secrets.  However,&lt;br /&gt;
it contains the Subject which will identify the user of the&lt;br /&gt;
certificate.  Third, I use the CA to sign the CSR.  This results in a&lt;br /&gt;
Certificate, which is a signed public key.  Certificates also contain&lt;br /&gt;
no secrets.  They are just the CSR which contains the Subject and a&lt;br /&gt;
cryptographic signature generated using the CA's key to make a special&lt;br /&gt;
checksum.  The idea is, instead of sharing your public key with&lt;br /&gt;
everyone you want to communicate, every participant only needs a copy&lt;br /&gt;
of the CA's public key or Certificate.  Each participant can validate&lt;br /&gt;
the signature of any certificate any other participant tries to share.&lt;br /&gt;
&lt;br /&gt;
;Key&lt;br /&gt;
: Private key&lt;br /&gt;
;CSR&lt;br /&gt;
: Unsigned public key&lt;br /&gt;
;Cert&lt;br /&gt;
: Signed public key&lt;br /&gt;
&lt;br /&gt;
== Installing OpenVPN ==&lt;br /&gt;
&lt;br /&gt;
I am going to assume that you will be using the precompiled package of&lt;br /&gt;
OpenVPN which every distro provides.  I see no good reason to compile&lt;br /&gt;
it from source.&lt;br /&gt;
&lt;br /&gt;
We are going to configure OpenVPN with one server and multiple&lt;br /&gt;
road-warrior style clients.  This just means that the server will&lt;br /&gt;
always have the same IP address, or at least DNS name, and will always&lt;br /&gt;
be on, and that the clients will come and go as they please and won't&lt;br /&gt;
have the same IP addresses or DNS names.&lt;br /&gt;
&lt;br /&gt;
The server is going to provide routing to its entire network.  Let's&lt;br /&gt;
assume the server is the gateway to a LAN, and that LAN's IP space is&lt;br /&gt;
192.168.1.0/24, and the router which runs OpenVPN has the address&lt;br /&gt;
192.168.1.1.  Since we are using TUN networking, we need to use an&lt;br /&gt;
interim network to route over.  Let's use 172.16.1.0/24 for this&lt;br /&gt;
space.  OpenVPN is actually going to break this space down into&lt;br /&gt;
multiple slash-30 networks, each containing four addresses -- two&lt;br /&gt;
usable, one network address and one broadcast address -- and it will&lt;br /&gt;
use up the first of these so in reality we will have room for only 63&lt;br /&gt;
clients in this scenario.  The first client to connect gets a network&lt;br /&gt;
that looks like this:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|| 172.16.1.4 || network&lt;br /&gt;
|-&lt;br /&gt;
|| 172.16.1.5 || server&lt;br /&gt;
|-&lt;br /&gt;
|| 172.16.1.6 || client&lt;br /&gt;
|-&lt;br /&gt;
|| 172.16.1.7 || broadcast&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The clients won't necessarily provide routing to their networks so&lt;br /&gt;
this means they are participating in a one-to-many VPN.  Therefore we&lt;br /&gt;
don't care what the network space our clients are in is, so long as it&lt;br /&gt;
is possible to cleanly route to the server's network.  That means no&lt;br /&gt;
IP conflicts in the two networks.  It is possible to create a&lt;br /&gt;
many-to-many VPN with OpenVPN, but we just won't be doing that in this&lt;br /&gt;
example.&lt;br /&gt;
&lt;br /&gt;
== Configure The Server ==&lt;br /&gt;
&lt;br /&gt;
Every installation of OpenVPN I have installed (on Linux) has always&lt;br /&gt;
used /etc/openvpn to store the configuration.  On Windows or MacOS it&lt;br /&gt;
is wherever you installed it, and on FreeBSD and OpenBSD it's &lt;br /&gt;
/usr/local/etc/openvpn.  We'll start with the server configuration&lt;br /&gt;
file.  For the server I left all the comments in the file.  There are&lt;br /&gt;
example configuration files in /usr/share/doc.  Create the following&lt;br /&gt;
as /etc/openvpn/server.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# Which local IP address should OpenVPN&lt;br /&gt;
# listen on? (optional)&lt;br /&gt;
;local a.b.c.d&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is probably not necessary to specify a particular address to listen&lt;br /&gt;
on.  Only use this if you definitely don't want OpenVPN to listen on&lt;br /&gt;
every address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Which TCP/UDP port should OpenVPN listen on?&lt;br /&gt;
# If you want to run multiple OpenVPN instances&lt;br /&gt;
# on the same machine, use a different port&lt;br /&gt;
# number for each one.  You will need to&lt;br /&gt;
# open up this port on your firewall.&lt;br /&gt;
port 1194&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Port 1194 is the registered port for OpenVPN.  In actual practice, I&lt;br /&gt;
have never noticed any significant attempts to crack or otherwise&lt;br /&gt;
abuse the default port out on the wild Internet.  There are probably&lt;br /&gt;
two reasons for this.  First, since UDP is a connectionless protocol,&lt;br /&gt;
it's impossible to tell if the port is open or filtered using normal&lt;br /&gt;
port-scanning like nmap.  And second, since authentication is via&lt;br /&gt;
X.509 certificates which are typically thousands of bits, the&lt;br /&gt;
likelihood of successfully guessing the correct signature to gain&lt;br /&gt;
access is astronomically near impossible.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# TCP or UDP server?&lt;br /&gt;
;proto tcp&lt;br /&gt;
proto udp&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use UDP for your VPN.  Tunneling TCP over TCP can be less reliable.&lt;br /&gt;
As previously stated, it's impossible to differentiate an open and a&lt;br /&gt;
filtered UDP port.  And the connection-oriented nature of TCP doesn't&lt;br /&gt;
actually buy you anything in this situation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;quot;dev tun&amp;quot; will create a routed IP tunnel,&lt;br /&gt;
# &amp;quot;dev tap&amp;quot; will create an ethernet tunnel.&lt;br /&gt;
# Use &amp;quot;dev tap0&amp;quot; if you are ethernet bridging&lt;br /&gt;
# and have precreated a tap0 virtual interface&lt;br /&gt;
# and bridged it with your ethernet interface.&lt;br /&gt;
# If you want to control access policies&lt;br /&gt;
# over the VPN, you must create firewall&lt;br /&gt;
# rules for the the TUN/TAP interface.&lt;br /&gt;
# On non-Windows systems, you can give&lt;br /&gt;
# an explicit unit number, such as tun0.&lt;br /&gt;
# On Windows, use &amp;quot;dev-node&amp;quot; for this.&lt;br /&gt;
# On most systems, the VPN will not function&lt;br /&gt;
# unless you partially or fully disable&lt;br /&gt;
# the firewall for the TUN/TAP interface.&lt;br /&gt;
;dev tap&lt;br /&gt;
dev tun&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated previously, we're using TUN networking for this example.&lt;br /&gt;
The comment mentions firewalls, and we'll cover iptables a little&lt;br /&gt;
later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Windows needs the TAP-Win32 adapter name&lt;br /&gt;
# from the Network Connections panel if you&lt;br /&gt;
# have more than one.  On XP SP2 or higher,&lt;br /&gt;
# you may need to selectively disable the&lt;br /&gt;
# Windows firewall for the TAP adapter.&lt;br /&gt;
# Non-Windows systems usually don't need this.&lt;br /&gt;
;dev-node MyTap&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The preceding section should be irrelevant unless you're using&lt;br /&gt;
Windows.  Running Windows as a server is just stupid; using it as a&lt;br /&gt;
gateway just makes no sense at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# SSL/TLS root certificate (ca), certificate&lt;br /&gt;
# (cert), and private key (key).  Each client&lt;br /&gt;
# and the server must have their own cert and&lt;br /&gt;
# key file.  The server and all clients will&lt;br /&gt;
# use the same ca file.&lt;br /&gt;
#&lt;br /&gt;
# See the &amp;quot;easy-rsa&amp;quot; directory for a series&lt;br /&gt;
# of scripts for generating RSA certificates&lt;br /&gt;
# and private keys.  Remember to use&lt;br /&gt;
# a unique Common Name for the server&lt;br /&gt;
# and each of the client certificates.&lt;br /&gt;
#&lt;br /&gt;
# Any X509 key management system can be used.&lt;br /&gt;
# OpenVPN can also use a PKCS #12 formatted key file&lt;br /&gt;
# (see &amp;quot;pkcs12&amp;quot; directive in man page).&lt;br /&gt;
ca ca.crt&lt;br /&gt;
cert server.crt&lt;br /&gt;
key server.key  # This file should be kept secret&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All files are going to be relative to the configuration file&lt;br /&gt;
unless otherwise qualified.  Generating each of these will be covered&lt;br /&gt;
below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Diffie hellman parameters.&lt;br /&gt;
# Generate your own with:&lt;br /&gt;
#   openssl dhparam -out dh2048.pem 2048&lt;br /&gt;
dh dh2048.pem&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server should include a Diffie-Hellman parameter.  Use the command&lt;br /&gt;
shown above to generate it.  This file improves security and makes the&lt;br /&gt;
tunnel harder to decrypt.  Generating a Diffie-Hellman parameter is&lt;br /&gt;
very time consuming; it can take several minutes to generate a&lt;br /&gt;
two-thousand bit parameter.  Be patient, it is not worth generating a&lt;br /&gt;
weak parameter file just to save a little time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Network topology&lt;br /&gt;
# Should be subnet (addressing via IP)&lt;br /&gt;
# unless Windows clients v2.0.9 and lower have to&lt;br /&gt;
# be supported (then net30, i.e. a /30 per client)&lt;br /&gt;
# Defaults to net30 (not recommended)&lt;br /&gt;
;topology subnet&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated, this parameter shouldn't be necessary unless you have to&lt;br /&gt;
support outdated Windows software.  OpenVPN is open source, just&lt;br /&gt;
download a more recent copy why don'tcha?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Configure server mode and supply a VPN subnet&lt;br /&gt;
# for OpenVPN to draw client addresses from.&lt;br /&gt;
# The server will take 10.8.0.1 for itself,&lt;br /&gt;
# the rest will be made available to clients.&lt;br /&gt;
# Each client will be able to reach the server&lt;br /&gt;
# on 10.8.0.1. Comment this line out if you are&lt;br /&gt;
# ethernet bridging. See the man page for more info.&lt;br /&gt;
;;server 10.8.0.0 255.255.255.0&lt;br /&gt;
server 172.16.1.0 255.255.255.0&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is where we configure the pool of addresses which will be used by&lt;br /&gt;
the client-to-server connections as illustrated above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Maintain a record of client &amp;lt;-&amp;gt; virtual IP address&lt;br /&gt;
# associations in this file.  If OpenVPN goes down or&lt;br /&gt;
# is restarted, reconnecting clients can be assigned&lt;br /&gt;
# the same virtual IP address from the pool that was&lt;br /&gt;
# previously assigned.&lt;br /&gt;
ifconfig-pool-persist ipp.txt&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you include the above parameter, then each client will get the same&lt;br /&gt;
IP address from the server pool above each time it reconnects.  You&lt;br /&gt;
can take advantage of this to implement client-specific firewall&lt;br /&gt;
rules.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Configure server mode for ethernet bridging.&lt;br /&gt;
# You must first use your OS's bridging capability&lt;br /&gt;
# to bridge the TAP interface with the ethernet&lt;br /&gt;
# NIC interface.  Then you must manually set the&lt;br /&gt;
# IP/netmask on the bridge interface, here we&lt;br /&gt;
# assume 10.8.0.4/255.255.255.0.  Finally we&lt;br /&gt;
# must set aside an IP range in this subnet&lt;br /&gt;
# (start=10.8.0.50 end=10.8.0.100) to allocate&lt;br /&gt;
# to connecting clients.  Leave this line commented&lt;br /&gt;
# out unless you are ethernet bridging.&lt;br /&gt;
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You would only need to use this parameter if you are using a TAP&lt;br /&gt;
interface and bridging your networks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Configure server mode for ethernet bridging&lt;br /&gt;
# using a DHCP-proxy, where clients talk&lt;br /&gt;
# to the OpenVPN server-side DHCP server&lt;br /&gt;
# to receive their IP address allocation&lt;br /&gt;
# and DNS server addresses.  You must first use&lt;br /&gt;
# your OS's bridging capability to bridge the TAP&lt;br /&gt;
# interface with the ethernet NIC interface.&lt;br /&gt;
# Note: this mode only works on clients (such as&lt;br /&gt;
# Windows), where the client-side TAP adapter is&lt;br /&gt;
# bound to a DHCP client.&lt;br /&gt;
;server-bridge&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, this parameter is TAP networking and bridge specific.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Push routes to the client to allow it&lt;br /&gt;
# to reach other private subnets behind&lt;br /&gt;
# the server.  Remember that these&lt;br /&gt;
# private subnets will also need&lt;br /&gt;
# to know to route the OpenVPN client&lt;br /&gt;
# address pool (10.8.0.0/255.255.255.0)&lt;br /&gt;
# back to the OpenVPN server.&lt;br /&gt;
;push &amp;quot;route 192.168.10.0 255.255.255.0&amp;quot;&lt;br /&gt;
;push &amp;quot;route 192.168.20.0 255.255.255.0&amp;quot;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your OpenVPN server is a gateway to multiple subnets, you can push&lt;br /&gt;
additional routes to the clients.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# To assign specific IP addresses to specific&lt;br /&gt;
# clients or if a connecting client has a private&lt;br /&gt;
# subnet behind it that should also have VPN access,&lt;br /&gt;
# use the subdirectory &amp;quot;ccd&amp;quot; for client-specific&lt;br /&gt;
# configuration files (see man page for more info).&lt;br /&gt;
&lt;br /&gt;
# EXAMPLE: Suppose the client&lt;br /&gt;
# having the certificate common name &amp;quot;Thelonious&amp;quot;&lt;br /&gt;
# also has a small subnet behind his connecting&lt;br /&gt;
# machine, such as 192.168.40.128/255.255.255.248.&lt;br /&gt;
# First, uncomment out these lines:&lt;br /&gt;
;client-config-dir ccd&lt;br /&gt;
;route 192.168.40.128 255.255.255.248&lt;br /&gt;
# Then create a file ccd/Thelonious with this line:&lt;br /&gt;
#   iroute 192.168.40.128 255.255.255.248&lt;br /&gt;
# This will allow Thelonious' private subnet to&lt;br /&gt;
# access the VPN.  This example will only work&lt;br /&gt;
# if you are routing, not bridging, i.e. you are&lt;br /&gt;
# using &amp;quot;dev tun&amp;quot; and &amp;quot;server&amp;quot; directives.&lt;br /&gt;
&lt;br /&gt;
# EXAMPLE: Suppose you want to give&lt;br /&gt;
# Thelonious a fixed VPN IP address of 10.9.0.1.&lt;br /&gt;
# First uncomment out these lines:&lt;br /&gt;
;client-config-dir ccd&lt;br /&gt;
;route 10.9.0.0 255.255.255.252&lt;br /&gt;
# Then add this line to ccd/Thelonious:&lt;br /&gt;
#   ifconfig-push 10.9.0.1 10.9.0.2&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All of the above examples are to give a particular host specific&lt;br /&gt;
configurations.  In a simple scenario such as ours, it is not&lt;br /&gt;
necessary.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Suppose that you want to enable different&lt;br /&gt;
# firewall access policies for different groups&lt;br /&gt;
# of clients.  There are two methods:&lt;br /&gt;
# (1) Run multiple OpenVPN daemons, one for each&lt;br /&gt;
#     group, and firewall the TUN/TAP interface&lt;br /&gt;
#     for each group/daemon appropriately.&lt;br /&gt;
# (2) (Advanced) Create a script to dynamically&lt;br /&gt;
#     modify the firewall in response to access&lt;br /&gt;
#     from different clients.  See man&lt;br /&gt;
#     page for more info on learn-address script.&lt;br /&gt;
;learn-address ./script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the comments state, if you want to modify your firewall each time a&lt;br /&gt;
particular client connects, in some particular way, then you could use&lt;br /&gt;
a script to do it.  Personally, I think you should have your firewall&lt;br /&gt;
rules pre-set and use the above ipp.txt file to assign the client the&lt;br /&gt;
expected address.  If you have more clients than your IP pool allows&lt;br /&gt;
to assign each of them a separate address, then use this script to add&lt;br /&gt;
their address to an IPSet, which will be matched by rules you already&lt;br /&gt;
have established.  Modifying your firewall rules dynamically by a&lt;br /&gt;
script can be a recipe for disaster and it's very difficult to&lt;br /&gt;
thoroughly test all the possible outcomes with a large number of&lt;br /&gt;
modifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# If enabled, this directive will configure&lt;br /&gt;
# all clients to redirect their default&lt;br /&gt;
# network gateway through the VPN, causing&lt;br /&gt;
# all IP traffic such as web browsing and&lt;br /&gt;
# and DNS lookups to go through the VPN&lt;br /&gt;
# (The OpenVPN server machine may need to NAT&lt;br /&gt;
# or bridge the TUN/TAP interface to the internet&lt;br /&gt;
# in order for this to work properly).&lt;br /&gt;
;push &amp;quot;redirect-gateway def1 bypass-dhcp&amp;quot;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some people want to configure OpenVPN as a proxy for their web&lt;br /&gt;
browsing.  This means all their web browsing traffic will pass out of&lt;br /&gt;
their local network encrypted and be kept out of the prying eyes of&lt;br /&gt;
whoever is watching at their gateway (either their ISP, employer, or&lt;br /&gt;
government).  If you want to configure this, follow the above example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Certain Windows-specific network settings&lt;br /&gt;
# can be pushed to clients, such as DNS&lt;br /&gt;
# or WINS server addresses.  CAVEAT:&lt;br /&gt;
# http://openvpn.net/faq.html#dhcpcaveats&lt;br /&gt;
# The addresses below refer to the public&lt;br /&gt;
# DNS servers provided by opendns.com.&lt;br /&gt;
;push &amp;quot;dhcp-option DNS 208.67.222.222&amp;quot;&lt;br /&gt;
;push &amp;quot;dhcp-option DNS 208.67.220.220&amp;quot;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can push any options normally available to any DHCP server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Uncomment this directive to allow different&lt;br /&gt;
# clients to be able to &amp;quot;see&amp;quot; each other.&lt;br /&gt;
# By default, clients will only see the server.&lt;br /&gt;
# To force clients to only see the server, you&lt;br /&gt;
# will also need to appropriately firewall the&lt;br /&gt;
# server's TUN/TAP interface.&lt;br /&gt;
;client-to-client&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most often, you don't need your clients to talk to each other over&lt;br /&gt;
your tunnel.  Usually they are only laptops or possibly desktop&lt;br /&gt;
computers and are not providing any services of their own to other&lt;br /&gt;
machines.  So you won't forward traffic from one client to another.&lt;br /&gt;
But if you do want to do this, then you need to turn on this&lt;br /&gt;
parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Uncomment this directive if multiple clients&lt;br /&gt;
# might connect with the same certificate/key&lt;br /&gt;
# files or common names.  This is recommended&lt;br /&gt;
# only for testing purposes.  For production use,&lt;br /&gt;
# each client should have its own certificate/key&lt;br /&gt;
# pair.&lt;br /&gt;
#&lt;br /&gt;
# IF YOU HAVE NOT GENERATED INDIVIDUAL&lt;br /&gt;
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,&lt;br /&gt;
# EACH HAVING ITS OWN UNIQUE &amp;quot;COMMON NAME&amp;quot;,&lt;br /&gt;
# UNCOMMENT THIS LINE OUT.&lt;br /&gt;
;duplicate-cn&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the time you should make sure each client has a unique common&lt;br /&gt;
name.  Quite often, the common name of a certificate will just be the&lt;br /&gt;
name of the person using it.  If that person happens to use multiple&lt;br /&gt;
computers, they might use the same name in multiple certificates (or&lt;br /&gt;
worse, use the same certificate across multiple machines -- discourage&lt;br /&gt;
this).  If this happens, then you must turn on this parameter.  Also,&lt;br /&gt;
you will probably not be able to use ipp.txt above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# The keepalive directive causes ping-like&lt;br /&gt;
# messages to be sent back and forth over&lt;br /&gt;
# the link so that each side knows when&lt;br /&gt;
# the other side has gone down.&lt;br /&gt;
# Ping every 10 seconds, assume that remote&lt;br /&gt;
# peer is down if no ping received during&lt;br /&gt;
# a 120 second time period.&lt;br /&gt;
keepalive 10 120&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The comments here are pretty self-explanatory.  I think the defaults&lt;br /&gt;
are reasonable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# For extra security beyond that provided&lt;br /&gt;
# by SSL/TLS, create an &amp;quot;HMAC firewall&amp;quot;&lt;br /&gt;
# to help block DoS attacks and UDP port flooding.&lt;br /&gt;
#&lt;br /&gt;
# Generate with:&lt;br /&gt;
#   openvpn --genkey --secret ta.key&lt;br /&gt;
#&lt;br /&gt;
# The server and each client must have&lt;br /&gt;
# a copy of this key.&lt;br /&gt;
# The second parameter should be '0'&lt;br /&gt;
# on the server and '1' on the clients.&lt;br /&gt;
;tls-auth ta.key 0 # This file is secret&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I'm not really sure how this is supposed to prevent flooding.  After&lt;br /&gt;
all, you can't control what someone else sends you.  Suffice it to&lt;br /&gt;
say, I haven't used this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Select a cryptographic cipher.&lt;br /&gt;
# This config item must be copied to&lt;br /&gt;
# the client config file as well.&lt;br /&gt;
;cipher BF-CBC        # Blowfish (default)&lt;br /&gt;
;cipher AES-128-CBC   # AES&lt;br /&gt;
;cipher DES-EDE3-CBC  # Triple-DES&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There have been a lot of issues concerning OpenSSL recently.  Some&lt;br /&gt;
were specific to the OpenSSL code, but some were just discoveries that&lt;br /&gt;
certain ciphers had weaknesses that weren't discovered previously.  If&lt;br /&gt;
this concerns you, you can discover what ciphers are available using&lt;br /&gt;
the command `openssl ciphers` and picking through the list until you&lt;br /&gt;
find a combination you like.  Make sure all clients are capable of&lt;br /&gt;
using the same one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Enable compression on the VPN link.&lt;br /&gt;
# If you enable it here, you must also&lt;br /&gt;
# enable it in the client config file.&lt;br /&gt;
comp-lzo&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding encryption to any traffic means that traffic gets heavier.  You&lt;br /&gt;
have to encode additional data about what you are sending so that the&lt;br /&gt;
other end can properly identify and decode the packets.  This means&lt;br /&gt;
using more bandwidth than a plain text transmission.  To help with&lt;br /&gt;
this, use compression.  This trades CPU time for network time.  In&lt;br /&gt;
this day and age, your CPU is probably much faster than your network,&lt;br /&gt;
so the trade-off advantage should be obvious.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# The maximum number of concurrently connected&lt;br /&gt;
# clients we want to allow.&lt;br /&gt;
;max-clients 100&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated above, in this example we are already limited to 63 clients&lt;br /&gt;
due to the address space we chose.  Honestly, I'm not sure why you&lt;br /&gt;
would want to impose any other form of artificial limitation on your&lt;br /&gt;
clients.  Maybe if your gateway's CPU was just so taxed that 101&lt;br /&gt;
connections was just too much?  Still, the option is there if you want&lt;br /&gt;
it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# It's a good idea to reduce the OpenVPN&lt;br /&gt;
# daemon's privileges after initialization.&lt;br /&gt;
#&lt;br /&gt;
# You can uncomment this out on&lt;br /&gt;
# non-Windows systems.&lt;br /&gt;
;user nobody&lt;br /&gt;
;group nobody&lt;br /&gt;
user nobody&lt;br /&gt;
group nogroup&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your distro may have a dedicated openvpn user and group.  I copied&lt;br /&gt;
this example from an installation which did not.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# The persist options will try to avoid&lt;br /&gt;
# accessing certain resources on restart&lt;br /&gt;
# that may no longer be accessible because&lt;br /&gt;
# of the privilege downgrade.&lt;br /&gt;
persist-key&lt;br /&gt;
persist-tun&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the comment says, ephemeral keys and tunnel devices might tear down&lt;br /&gt;
across restarts.  In my own experience, these parameters don't make a&lt;br /&gt;
huge difference, but they make restarts a little quicker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Output a short status file showing&lt;br /&gt;
# current connections, truncated&lt;br /&gt;
# and rewritten every minute.&lt;br /&gt;
status /tmp/openvpn-status.log&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file is just a quick glance at the current state of affairs for&lt;br /&gt;
the VPN server.  I moved it to /tmp so that it would not continuously&lt;br /&gt;
write to flash memory, wearing it out quicker.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# By default, log messages will go to the syslog (or&lt;br /&gt;
# on Windows, if running as a service, they will go to&lt;br /&gt;
# the &amp;quot;\Program Files\OpenVPN\log&amp;quot; directory).&lt;br /&gt;
# Use log or log-append to override this default.&lt;br /&gt;
# &amp;quot;log&amp;quot; will truncate the log file on OpenVPN startup,&lt;br /&gt;
# while &amp;quot;log-append&amp;quot; will append to it.  Use one&lt;br /&gt;
# or the other (but not both).&lt;br /&gt;
;log         openvpn.log&lt;br /&gt;
;log-append  openvpn.log&lt;br /&gt;
log-append /tmp/openvpn.log&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
My own OpenVPN server is running on a small router.  I chose to write&lt;br /&gt;
to a local log rather than syslog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set the appropriate level of log&lt;br /&gt;
# file verbosity.&lt;br /&gt;
#&lt;br /&gt;
# 0 is silent, except for fatal errors&lt;br /&gt;
# 4 is reasonable for general usage&lt;br /&gt;
# 5 and 6 can help to debug connection problems&lt;br /&gt;
# 9 is extremely verbose&lt;br /&gt;
verb 3&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the default.  I haven't seen a need to change it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
# Silence repeating messages.  At most 20&lt;br /&gt;
# sequential messages of the same message&lt;br /&gt;
# category will be output to the log.&lt;br /&gt;
;mute 20&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have never had a reason to change this one.&lt;br /&gt;
&lt;br /&gt;
== Configure Clients ==&lt;br /&gt;
&lt;br /&gt;
Each of the clients can have multiple servers which they connect to.&lt;br /&gt;
For example you might have both an office LAN and a data center you&lt;br /&gt;
regularly log in to.  Or you might be a consultant with multiple&lt;br /&gt;
clients you regularly have to do maintenance for.  For this reason, I&lt;br /&gt;
usually name the client configurations after the servers they connect&lt;br /&gt;
to.  So name this appropriately, home.conf, office.conf, or whatever.&lt;br /&gt;
This time around I have stripped the comments aout of the&lt;br /&gt;
configuration file.  Examples should be available in /usr/share/doc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
client&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells openvpn that it will be initiating an outbound connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
remote gateway.example.com&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When configured as a client, OpenVPN needs to know where to connect.&lt;br /&gt;
Try to use a fully qualified domain name here.  Also, this fully&lt;br /&gt;
qualified domain name needs to be the common name or a subject&lt;br /&gt;
alternative name for the server's certificate.  If the clients must&lt;br /&gt;
use the server's IP address, it must be part of the subject of the&lt;br /&gt;
certificate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ca ca.crt&lt;br /&gt;
cert client.example-com.crt&lt;br /&gt;
key client.example-com.key&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A separate CA can be used to sign the certificates of both the server&lt;br /&gt;
and the clients.  If you do this, the clients need the CA certificate&lt;br /&gt;
which matches the key that signed the server's certificate, and the&lt;br /&gt;
server needs the CA certificate that matches the key which signs all&lt;br /&gt;
the clients' certificates.&lt;br /&gt;
&lt;br /&gt;
Since a client can connect to multiple servers, I name the local key&lt;br /&gt;
and certificate files after the organization with which they will be&lt;br /&gt;
used.  It is possible to configure multiple servers to authenticate&lt;br /&gt;
certificates signed by the same CA, so clients connecting to multiple&lt;br /&gt;
servers like this will only need one certificate for the whole&lt;br /&gt;
organization.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
dev tun&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, specify to use TUN networking.  This must match the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
proto udp&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, specify to use UDP.  This must also match the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
nobind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says not to specify the source port of the outgoing connection.&lt;br /&gt;
It should not be necessary to do so unless the server is expecting&lt;br /&gt;
only certain source ports.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
persist-key&lt;br /&gt;
persist-tun&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As with the server, this should reduce the amount of time it takes to&lt;br /&gt;
restart the software.  I don't think it will make a huge difference&lt;br /&gt;
for clients, but it doesn't hurt and the example encourages it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
user openvpn&lt;br /&gt;
group openvpn&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specify to run as an unprivileged user.&lt;/div&gt;</summary>
		<author><name>Jeff</name></author>	</entry>

	</feed>