<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.comfac.net/index.php?action=history&amp;feed=atom&amp;title=Training_Lab_6%3A_OpenVPN</id>
	<title>Training Lab 6: OpenVPN - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.comfac.net/index.php?action=history&amp;feed=atom&amp;title=Training_Lab_6%3A_OpenVPN"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_6:_OpenVPN&amp;action=history"/>
	<updated>2026-06-05T10:58:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mediawiki.comfac.net/index.php?title=Training_Lab_6:_OpenVPN&amp;diff=240&amp;oldid=prev</id>
		<title>Justinaquino: Automated upload of Netgate pfSense training content</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_6:_OpenVPN&amp;diff=240&amp;oldid=prev"/>
		<updated>2026-04-23T07:08:32Z</updated>

		<summary type="html">&lt;p&gt;Automated upload of Netgate pfSense training content&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#e7f3ff; border-left:6px solid #2196F3; padding:10px; margin-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Training Lab 6: OpenVPN&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Hands-on lab covering site-to-site SSL/TLS VPN, remote access VPN, certificate infrastructure, and testing in pfSense.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This lab goes through example configurations of OpenVPN for site-to-site and remote access.&lt;br /&gt;
&lt;br /&gt;
== OpenVPN SSL/TLS Site-to-Site VPN ==&lt;br /&gt;
&lt;br /&gt;
We’re going to configure OpenVPN to connect the HQ and branch networks. HQ will run the server, and the branch will be the client.&lt;br /&gt;
&lt;br /&gt;
There is no functional difference in whether HQ or branch runs the server side. Most often people put the server instances on the main location’s end. If one end has a dynamic IP and one static, run the server on the static IP side. If one end is behind NAT, that end should be the client. In this case, the server side will be on the fw1-hq firewall.&lt;br /&gt;
&lt;br /&gt;
=== Delete IPsec ===&lt;br /&gt;
&lt;br /&gt;
First, since we have an IPsec VPN configured here already, IPsec needs to be disabled. On both fw1-HQ and fw1-branch, browse to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; IPsec&amp;#039;&amp;#039;&amp;#039;. Put a check mark by each IPsec tunnel and click &amp;#039;&amp;#039;&amp;#039;Delete P1s&amp;#039;&amp;#039;&amp;#039;. Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;, then &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create the Certificate Infrastructure ===&lt;br /&gt;
&lt;br /&gt;
OpenVPN makes use of a certificate infrastructure in authenticating the session as well as routing traffic to and from member sites. On the server we must create a new Certificate Authority (CA), as well as server and client certificate/key pairs. This will be done on fw1-hq.&lt;br /&gt;
&lt;br /&gt;
==== Create the Certificate Authority (CA) ====&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Cert Manager&amp;#039;&amp;#039;&amp;#039; and click the green &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; button to add a new CA.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Descriptive Name || S2SCA&lt;br /&gt;
|-&lt;br /&gt;
| Method || Create an Internal Certificate Authority&lt;br /&gt;
|-&lt;br /&gt;
| Randomize Serial || (checked)&lt;br /&gt;
|-&lt;br /&gt;
| Key Type || RSA 2048&lt;br /&gt;
|-&lt;br /&gt;
| Digest Algorithm || sha256&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime || 3650&lt;br /&gt;
|-&lt;br /&gt;
| Common Name || S2SCA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(Leave the rest blank and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.)&lt;br /&gt;
&lt;br /&gt;
==== Create the Server Certificate ====&lt;br /&gt;
&lt;br /&gt;
Next, click on the &amp;#039;&amp;#039;&amp;#039;Certificates&amp;#039;&amp;#039;&amp;#039; tab, and click the green &amp;#039;&amp;#039;&amp;#039;+Add/Sign&amp;#039;&amp;#039;&amp;#039; button near the bottom.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Method || Create an internal server certificate&lt;br /&gt;
|-&lt;br /&gt;
| Descriptive Name || VPNserver&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Authority || S2SCA&lt;br /&gt;
|-&lt;br /&gt;
| Key Type || RSA 2048&lt;br /&gt;
|-&lt;br /&gt;
| Digest Algorithm || sha256&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime || 398&lt;br /&gt;
|-&lt;br /&gt;
| Common Name || VPNserver&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Type || Server Certificate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Scroll down and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Create the Client Certificate ====&lt;br /&gt;
&lt;br /&gt;
While still on the &amp;#039;&amp;#039;&amp;#039;Certificates&amp;#039;&amp;#039;&amp;#039; tab, click the green &amp;#039;&amp;#039;&amp;#039;+Add/Sign&amp;#039;&amp;#039;&amp;#039; button near the bottom to create the client certificate.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Method || Create an internal certificate&lt;br /&gt;
|-&lt;br /&gt;
| Descriptive Name || VPNclient&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Authority || S2SCA&lt;br /&gt;
|-&lt;br /&gt;
| Key Type || RSA 2048&lt;br /&gt;
|-&lt;br /&gt;
| Digest Algorithm || sha256&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime || 3650&lt;br /&gt;
|-&lt;br /&gt;
| Common Name || VPNclient&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Type || User Certificate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Scroll down and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Export Certificates and Keys ====&lt;br /&gt;
&lt;br /&gt;
The next task is to export the certificates and keys which the client requires when connecting to the OpenVPN server.&lt;br /&gt;
&lt;br /&gt;
# Navigate to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Cert Manager &amp;gt; CAs&amp;#039;&amp;#039;&amp;#039; and find the S2SCA. Click the export button to save the CA certificate to the downloads folder on HQ-Client.&lt;br /&gt;
# Next, click on the &amp;#039;&amp;#039;&amp;#039;Certificates&amp;#039;&amp;#039;&amp;#039; tab and scroll down until you see the VPNclient certificate entry. Click the export button to save the certificate data and the key data to the Downloads folder on HQ-Client.&lt;br /&gt;
&lt;br /&gt;
=== Configure Server on fw1-HQ ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039; on fw1-HQ. On the &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; tab, click &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; to add a new server instance.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Server Mode || Peer to Peer (SSL/TLS)&lt;br /&gt;
|-&lt;br /&gt;
| Description || HQ to Branch VPN&lt;br /&gt;
|-&lt;br /&gt;
| TLS Configuration || (checked)&lt;br /&gt;
|-&lt;br /&gt;
| Automatically generate TLS key || (checked)&lt;br /&gt;
|-&lt;br /&gt;
| Peer Certificate Authority || S2SCA&lt;br /&gt;
|-&lt;br /&gt;
| Server Certificate || VPNserver&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Tunnel Network || 172.17.6.0/24&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Local Network(s) || 172.17.1.0/24, 172.17.2.0/24, 172.18.1.0/24&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Remote Network(s) || 172.18.1.0/24&lt;br /&gt;
|-&lt;br /&gt;
| Inactive || 0 (connections can stay up indefinitely)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; at the bottom, then click the edit icon to edit the server you just created. Highlight and copy the entire contents of the &amp;#039;&amp;#039;&amp;#039;TLS Key&amp;#039;&amp;#039;&amp;#039; box. Paste it into a file called &amp;#039;&amp;#039;&amp;#039;TLS.key&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This TLS key will be needed on the client side of the connection.&lt;br /&gt;
&lt;br /&gt;
=== Create Client-Specific Overrides ===&lt;br /&gt;
&lt;br /&gt;
The purpose of the Client-Specific Override (CSO) is to tie a client’s subnet to their certificate. Navigate to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039; and click the &amp;#039;&amp;#039;&amp;#039;Client Specific Overrides&amp;#039;&amp;#039;&amp;#039; tab. Click the green &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; button.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Server List || HQ to Branch VPN&lt;br /&gt;
|-&lt;br /&gt;
| Common Name || VPNclient&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Remote Network || 172.18.1.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Leave everything else blank or default, scroll down and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Permit Traffic to Server ===&lt;br /&gt;
&lt;br /&gt;
Now we need to add a firewall rule to permit the outside portion of the VPN, from the client to the server. On fw1-HQ, browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Rules &amp;gt; WAN&amp;#039;&amp;#039;&amp;#039;. Click &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Action || Pass&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || UDP&lt;br /&gt;
|-&lt;br /&gt;
| Source || 203.0.113.10&lt;br /&gt;
|-&lt;br /&gt;
| Source port || any&lt;br /&gt;
|-&lt;br /&gt;
| Destination || WAN address&lt;br /&gt;
|-&lt;br /&gt;
| Destination port || 1194&lt;br /&gt;
|-&lt;br /&gt;
| Description || allow branch OpenVPN site to site&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Then click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Permit Traffic within VPN ===&lt;br /&gt;
&lt;br /&gt;
Traffic within OpenVPN connections is filtered by the firewall rules on the OpenVPN tab. Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Rules &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039;. Click &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || OpenVPN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || Any&lt;br /&gt;
|-&lt;br /&gt;
| Source || Network, 172.18.0.0/16&lt;br /&gt;
|-&lt;br /&gt;
| Destination || any&lt;br /&gt;
|-&lt;br /&gt;
| Description || allow branch network&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The server-side configuration is now complete.&lt;br /&gt;
&lt;br /&gt;
=== Configure Client on fw1-branch ===&lt;br /&gt;
&lt;br /&gt;
Before we can create the client side of the VPN, we must first import the CA and Client Certificate and Keys into the fw1-branch firewall.&lt;br /&gt;
&lt;br /&gt;
==== Import the CA Certificate ====&lt;br /&gt;
&lt;br /&gt;
Click on &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Cert Manager&amp;#039;&amp;#039;&amp;#039; and click the green &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; button.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Descriptive Name || S2SCA&lt;br /&gt;
|-&lt;br /&gt;
| Method || Import an existing Certificate Authority&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Data || Paste contents of S2SCA.crt&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Highlight all the contents of the &amp;#039;&amp;#039;&amp;#039;S2SCA.crt&amp;#039;&amp;#039;&amp;#039; file, and paste it into the &amp;#039;&amp;#039;&amp;#039;Certificate Data&amp;#039;&amp;#039;&amp;#039; field on fw1-branch, and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Import the Client Certificate and Key ====&lt;br /&gt;
&lt;br /&gt;
Click on the &amp;#039;&amp;#039;&amp;#039;Certificates&amp;#039;&amp;#039;&amp;#039; tab and click the green &amp;#039;&amp;#039;&amp;#039;+Add/Sign&amp;#039;&amp;#039;&amp;#039; button near the bottom to import your Client Certificate.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Method || Import an existing certificate&lt;br /&gt;
|-&lt;br /&gt;
| Descriptive Name || VPNclient&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Data || Paste contents of VPNclient.crt&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Key || Paste contents of VPNclient.key&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Create the OpenVPN Client ====&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;&amp;#039;Clients&amp;#039;&amp;#039;&amp;#039; tab. Click the green &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; button.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Server Mode || Peer to Peer (SSL/TLS)&lt;br /&gt;
|-&lt;br /&gt;
| Device Mode || tun&lt;br /&gt;
|-&lt;br /&gt;
| Server host or address || 192.0.2.2&lt;br /&gt;
|-&lt;br /&gt;
| Description || Branch to HQ VPN&lt;br /&gt;
|-&lt;br /&gt;
| Automatically generate a TLS key || UNCHECKED&lt;br /&gt;
|-&lt;br /&gt;
| Peer Certificate Authority || S2SCA&lt;br /&gt;
|-&lt;br /&gt;
| Client Certificate || VPNclient&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
(Here, you will edit the OpenVPN server configuration on fw1-hq, and copy the TLS key data from that server configuration into this client’s TLS key box. You may have saved this file on your HQ-Client as &amp;#039;&amp;#039;&amp;#039;TLS.key&amp;#039;&amp;#039;&amp;#039;.)&lt;br /&gt;
&lt;br /&gt;
Scroll down and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==== Permit Traffic within VPN ====&lt;br /&gt;
&lt;br /&gt;
Add a firewall rule to permit traffic within the VPN, same as the other side but changing the source to HQ’s 172.17.0.0/16.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Action || Pass&lt;br /&gt;
|-&lt;br /&gt;
| Interface || OpenVPN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || Any&lt;br /&gt;
|-&lt;br /&gt;
| Source || 172.17.0.0/16&lt;br /&gt;
|-&lt;br /&gt;
| Destination || any&lt;br /&gt;
|-&lt;br /&gt;
| Description || Allow HQ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Check Status and Test ===&lt;br /&gt;
&lt;br /&gt;
On fw1-branch, browse to &amp;#039;&amp;#039;&amp;#039;Status &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039;. There you should see the status as up. If not, skip to the troubleshooting section.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Testing:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
From HQ-client, try to ping fw1-branch and branch-client:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
training@hq-client:~$ ping -c 3 172.18.1.1&lt;br /&gt;
PING 172.18.1.1 (172.18.1.1) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 172.18.1.1: icmp_seq=1 ttl=63 time=2.40 ms&lt;br /&gt;
...&lt;br /&gt;
--- 172.18.1.1 ping statistics ---&lt;br /&gt;
3 packets transmitted, 3 received, 0% packet loss, time 2004ms&lt;br /&gt;
rtt min/avg/max/mdev = 2.406/3.841/4.843/1.043 ms&lt;br /&gt;
&lt;br /&gt;
training@hq-client:~$ ping -c 3 172.18.1.100&lt;br /&gt;
PING 172.18.1.100 (172.18.1.100) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 172.18.1.100: icmp_seq=1 ttl=62 time=4.26 ms&lt;br /&gt;
...&lt;br /&gt;
--- 172.18.1.100 ping statistics ---&lt;br /&gt;
3 packets transmitted, 3 received, 0% packet loss, time 2003ms&lt;br /&gt;
rtt min/avg/max/mdev = 3.783/4.309/4.877/0.447 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then from branch-client, try to ping HQ-client and server1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
training@branch-client:~$ ping -c 3 172.17.1.100&lt;br /&gt;
PING 172.17.1.100 (172.17.1.100) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 172.17.1.100: icmp_seq=1 ttl=62 time=3.73 ms&lt;br /&gt;
64 bytes from 172.17.1.100: icmp_seq=2 ttl=62 time=5.21 ms&lt;br /&gt;
64 bytes from 172.17.1.100: icmp_seq=3 ttl=62 time=5.14 ms&lt;br /&gt;
--- 172.17.1.100 ping statistics ---&lt;br /&gt;
3 packets transmitted, 3 received, 0% packet loss, time 2003ms&lt;br /&gt;
rtt min/avg/max/mdev = 3.730/4.698/5.219/0.685 ms&lt;br /&gt;
&lt;br /&gt;
training@branch-client:~$ ping -c 3 172.17.2.10&lt;br /&gt;
PING 172.17.2.10 (172.17.2.10) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 172.17.2.10: icmp_seq=1 ttl=62 time=4.02 ms&lt;br /&gt;
64 bytes from 172.17.2.10: icmp_seq=2 ttl=62 time=4.01 ms&lt;br /&gt;
64 bytes from 172.17.2.10: icmp_seq=3 ttl=62 time=5.19 ms&lt;br /&gt;
--- 172.17.2.10 ping statistics ---&lt;br /&gt;
3 packets transmitted, 3 received, 0% packet loss, time 2004ms&lt;br /&gt;
rtt min/avg/max/mdev = 4.011/4.408/5.192/0.554 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also try browsing to server1 from branch-client: &amp;lt;code&amp;gt;http://172.17.2.10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the client side status doesn’t show as up, check the troubleshooting section of the OpenVPN chapter in the book for guidance. The most likely causes are an incorrect or missing firewall rule on the WAN of the server (port 1194 rule created above). Check fw1-HQ firewall logs for any blocks. If it’s not getting blocked, and connectivity between the sites works in general, something in the OpenVPN server or client configuration is the likely cause. Double check your configuration on both the client and server, and ensure the shared key was pasted over correctly.&lt;br /&gt;
&lt;br /&gt;
== OpenVPN Remote Access VPN ==&lt;br /&gt;
&lt;br /&gt;
In this section we’re going to set up an OpenVPN remote access server for remote mobile clients.&lt;br /&gt;
&lt;br /&gt;
=== Server Setup Wizard ===&lt;br /&gt;
&lt;br /&gt;
On fw1-HQ, browse to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039;, and click the &amp;#039;&amp;#039;&amp;#039;Wizard&amp;#039;&amp;#039;&amp;#039; tab.&lt;br /&gt;
&lt;br /&gt;
=== Authentication Backend ===&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;Local User Access&amp;#039;&amp;#039;&amp;#039; and click &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Create New Certificate Authority ===&lt;br /&gt;
&lt;br /&gt;
Fill in these values as desired. The locale information has no functional impact and generally isn’t visible anywhere unless you go looking for it.&lt;br /&gt;
&lt;br /&gt;
=== Create New Server Certificate ===&lt;br /&gt;
&lt;br /&gt;
Again, fill in these values as desired.&lt;br /&gt;
&lt;br /&gt;
=== OpenVPN Server Configuration ===&lt;br /&gt;
&lt;br /&gt;
Most things can be left at defaults here. The port must be changed, since we’re already using port 1194 for the site-to-site VPN server.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Local Port || 1195&lt;br /&gt;
|-&lt;br /&gt;
| Description || Remote Access VPN&lt;br /&gt;
|-&lt;br /&gt;
| Tunnel Network || 172.17.4.0/24&lt;br /&gt;
|-&lt;br /&gt;
| Local Network || 172.16.0.0/12&lt;br /&gt;
|-&lt;br /&gt;
| DNS Server 1 || 172.17.1.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Leave everything not listed above at defaults and click &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Firewall Rule Configuration ===&lt;br /&gt;
&lt;br /&gt;
The last step of the wizard prompts whether you want to add a rule to allow traffic from clients to the OpenVPN server, and allow traffic inside the VPN from clients when connected. Check both boxes and click &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Finish&amp;#039;&amp;#039;&amp;#039; on the last page.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Complete ===&lt;br /&gt;
&lt;br /&gt;
The configuration is now complete. The last screen reminds you to install the OpenVPN Client Export package if you’d like to use it. It’s already pre-installed on this system to save time. Click &amp;#039;&amp;#039;&amp;#039;Finish&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Rules&amp;#039;&amp;#039;&amp;#039; to see the rules added by the wizard. On the &amp;#039;&amp;#039;&amp;#039;WAN&amp;#039;&amp;#039;&amp;#039; tab, you’ll see the rule allowing traffic to reach the OpenVPN server instance. Then click the &amp;#039;&amp;#039;&amp;#039;OpenVPN&amp;#039;&amp;#039;&amp;#039; tab to see the rule added to permit traffic from the connected clients.&lt;br /&gt;
&lt;br /&gt;
This may be overly-permissive for real world scenarios since it allows all traffic coming in via OpenVPN from any source to any destination. In a real world setup, you may need to restrict this rule.&lt;br /&gt;
&lt;br /&gt;
=== Special Configuration for Older Clients ===&lt;br /&gt;
&lt;br /&gt;
Although this is rarely necessary, some older OpenVPN clients, like the one installed on your remote-host, will require some extra configuration in the OpenVPN server. Click the &amp;#039;&amp;#039;&amp;#039;Edit&amp;#039;&amp;#039;&amp;#039; button under the Remote Access VPN, and scroll down to the bottom of the screen. Place this into the &amp;#039;&amp;#039;&amp;#039;Custom Options&amp;#039;&amp;#039;&amp;#039; box and Save:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tls-version-min 1.0;&lt;br /&gt;
tls-cipher DEFAULT:@SECLEVEL=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== User Setup ===&lt;br /&gt;
&lt;br /&gt;
Users need a certificate from the RemoteVPNCA to connect. We’ll add a certificate to the &amp;#039;&amp;#039;&amp;#039;vpntest&amp;#039;&amp;#039;&amp;#039; account created during the IPsec lab. Browse to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; User Manager&amp;#039;&amp;#039;&amp;#039;, and edit the vpntest user. Then click the &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039; button next to &amp;#039;&amp;#039;&amp;#039;User Certificate&amp;#039;&amp;#039;&amp;#039; to create the certificate.&lt;br /&gt;
&lt;br /&gt;
Choose method &amp;#039;&amp;#039;&amp;#039;Create an internal certificate.&amp;#039;&amp;#039;&amp;#039; Both &amp;#039;&amp;#039;&amp;#039;Descriptive name&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Common Name&amp;#039;&amp;#039;&amp;#039; should be set to the username. The other fields can be left to defaults.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| User || vpntest&lt;br /&gt;
|-&lt;br /&gt;
| Certificate Method || Create an internal certificate&lt;br /&gt;
|-&lt;br /&gt;
| Descriptive Name || vpntest&lt;br /&gt;
|-&lt;br /&gt;
| Common Name || vpntest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;. Back at the user edit screen, you’ll see the user’s certificate. Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; to save the user changes.&lt;br /&gt;
&lt;br /&gt;
=== Client Configuration ===&lt;br /&gt;
&lt;br /&gt;
The OpenVPN Client Export utility eases the process of client configuration. It’s a package that comes pre-installed on the lab VMs, but will need to be installed under &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Packages&amp;#039;&amp;#039;&amp;#039; on your other systems.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; OpenVPN&amp;#039;&amp;#039;&amp;#039;, and click the &amp;#039;&amp;#039;&amp;#039;Client Export&amp;#039;&amp;#039;&amp;#039; tab.&lt;br /&gt;
&lt;br /&gt;
For our lab purposes, all other settings can be left at their defaults. Scroll down to the bottom to find the vpntest user’s client export options.&lt;br /&gt;
&lt;br /&gt;
For Windows systems, the Windows installer is what you’ll want. Choose x86 for 32 bit versions of Windows and x64 for 64 bit versions. The Viscosity bundle is for Windows or Mac OS X clients running the Viscosity client. The inline configuration options are most commonly used for iOS and Android clients.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Standard Configuration&amp;#039;&amp;#039;&amp;#039; Archive option downloads a zip containing the user’s certificate, TLS key for the server, and OpenVPN config file.&lt;br /&gt;
&lt;br /&gt;
Here you will see the remote access server just created in the wizard. Because the RemoteHost’s VPN client is older, we need to scroll down the page and make sure to put a check mark on &amp;#039;&amp;#039;&amp;#039;Legacy Client&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
&lt;br /&gt;
In this lab environment, the only machine that’s available in the circumstance of a typical client out on the Internet is the remote-host VM. First, add it to the &amp;#039;&amp;#039;&amp;#039;RemoteAdmin&amp;#039;&amp;#039;&amp;#039; alias on fw1-HQ so you can log into fw1-HQ from that host to ease getting the OpenVPN configuration onto the client. Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Aliases&amp;#039;&amp;#039;&amp;#039;, and edit the RemoteAdmin alias. Add &amp;#039;&amp;#039;&amp;#039;100.64.0.50/32&amp;#039;&amp;#039;&amp;#039; to that alias, save, then apply changes.&lt;br /&gt;
&lt;br /&gt;
Now connect with VNC to &amp;#039;&amp;#039;&amp;#039;100.64.0.50&amp;#039;&amp;#039;&amp;#039; (remote-host) to begin the client-side setup. Bring up its web browser and browse to &amp;#039;&amp;#039;&amp;#039;https://192.0.2.2&amp;#039;&amp;#039;&amp;#039;. Log in and browse to &amp;#039;&amp;#039;&amp;#039;VPN &amp;gt; OpenVPN &amp;gt; Client Export&amp;#039;&amp;#039;&amp;#039; tab. Export the &amp;#039;&amp;#039;&amp;#039;Configuration Archive&amp;#039;&amp;#039;&amp;#039; option for the vpntest user.&lt;br /&gt;
&lt;br /&gt;
Make a folder called OpenVPN in your Documents folder, and save the zip file there. Right click the zip file and choose &amp;#039;&amp;#039;&amp;#039;Extract Here&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Click the Network Manager icon → VPN Connections → Configure VPN.&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039; and scroll down to &amp;#039;&amp;#039;&amp;#039;Import a Saved Configuration&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Navigate to the folder where the OpenVPN configuration archive was extracted. Click on the &amp;#039;&amp;#039;&amp;#039;.ovpn&amp;#039;&amp;#039;&amp;#039; file and choose &amp;#039;&amp;#039;&amp;#039;Open&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Fill in the username and password portions of the next screen, and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
You may get prompted to choose a password for a new keyring. If so, just enter “password” in both blanks and click &amp;#039;&amp;#039;&amp;#039;Continue&amp;#039;&amp;#039;&amp;#039; and then &amp;#039;&amp;#039;&amp;#039;Close&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now connect to the OpenVPN server by clicking on the Network Manager → VPN Connections and choosing your VPN configuration.&lt;br /&gt;
&lt;br /&gt;
Enter your password and click &amp;#039;&amp;#039;&amp;#039;Ok&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you should verify you can reach things on the HQ LAN and DMZ networks. Try HQ-client at &amp;#039;&amp;#039;&amp;#039;172.17.1.100&amp;#039;&amp;#039;&amp;#039;, server1 at &amp;#039;&amp;#039;&amp;#039;172.17.2.10&amp;#039;&amp;#039;&amp;#039; and server2 at &amp;#039;&amp;#039;&amp;#039;172.17.2.20&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Once you have verified that the OpenVPN connection is functioning as expected, please disconnect the OpenVPN session on the remote host.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
This concludes Lab 6.&lt;br /&gt;
&lt;br /&gt;
== Source Attribution ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Source: Netgate pfSense Training Material — FUND001-LIVE-Lab6-OpenVPN.pdf © 2021 Rubicon Communications, LLC (Netgate)&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Justinaquino</name></author>
	</entry>
</feed>