<?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_7%3A_WireGuard</id>
	<title>Training Lab 7: WireGuard - 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_7%3A_WireGuard"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_7:_WireGuard&amp;action=history"/>
	<updated>2026-06-05T10:58:56Z</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_7:_WireGuard&amp;diff=242&amp;oldid=prev</id>
		<title>Justinaquino: Created page with &quot;__NOTOC__  &lt;div style=&quot;background:#e7f3ff;border:1px solid #a3c6ff;padding:10px;margin-bottom:15px;&quot;&gt; &#039;&#039;&#039;Training Lab 7: WireGuard Site-to-Site VPN&#039;&#039;&#039; — pfSense Plus Fundamentals and Practical Application &lt;/div&gt;  == Overview ==  This lab goes through an example configuration of WireGuard for site-to-site VPNs.  WireGuard has no concept of sessions or connections. The protocol uses public and private keys to authenticate and route traffic. WireGuard instances consist of...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_7:_WireGuard&amp;diff=242&amp;oldid=prev"/>
		<updated>2026-04-23T07:09:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  &amp;lt;div style=&amp;quot;background:#e7f3ff;border:1px solid #a3c6ff;padding:10px;margin-bottom:15px;&amp;quot;&amp;gt; &amp;#039;&amp;#039;&amp;#039;Training Lab 7: WireGuard Site-to-Site VPN&amp;#039;&amp;#039;&amp;#039; — pfSense Plus Fundamentals and Practical Application &amp;lt;/div&amp;gt;  == Overview ==  This lab goes through an example configuration of WireGuard for site-to-site VPNs.  WireGuard has no concept of sessions or connections. The protocol uses public and private keys to authenticate and route traffic. WireGuard instances consist of...&amp;quot;&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:1px solid #a3c6ff;padding:10px;margin-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Training Lab 7: WireGuard Site-to-Site VPN&amp;#039;&amp;#039;&amp;#039; — pfSense Plus Fundamentals and Practical Application&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 an example configuration of WireGuard for site-to-site VPNs.&lt;br /&gt;
&lt;br /&gt;
WireGuard has no concept of sessions or connections. The protocol uses public and private keys to authenticate and route traffic. WireGuard instances consist of a tunnel and one or more peer definitions which contain the necessary keys and other configuration data that allows the two sides to communicate.&lt;br /&gt;
&lt;br /&gt;
== Step 1: Delete OpenVPN ==&lt;br /&gt;
&lt;br /&gt;
First, since we have an OpenVPN configured here already, we need to delete it so it doesn’t interfere with our WireGuard setup. On both fw1-HQ and fw1-branch, browse to &amp;#039;&amp;#039;&amp;#039;VPN → OpenVPN&amp;#039;&amp;#039;&amp;#039; and delete all client and server instances.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Configure WireGuard Settings ==&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;VPN → WireGuard → Settings&amp;#039;&amp;#039;&amp;#039; on both firewalls and:&lt;br /&gt;
&lt;br /&gt;
* Click the &amp;#039;&amp;#039;&amp;#039;Enable&amp;#039;&amp;#039;&amp;#039; checkbox&lt;br /&gt;
* For Interface Group Membership, choose &amp;#039;&amp;#039;&amp;#039;Only Unassigned Tunnels&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Uncheck &amp;#039;&amp;#039;&amp;#039;Hide Secrets&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Hide Peers&amp;#039;&amp;#039;&amp;#039;&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;
== Step 3: Add a New Tunnel on Both Firewalls ==&lt;br /&gt;
&lt;br /&gt;
On FW1-HQ and Branch-FW, navigate to &amp;#039;&amp;#039;&amp;#039;VPN → WireGuard → Tunnels&amp;#039;&amp;#039;&amp;#039; and click the green &amp;#039;&amp;#039;&amp;#039;+Add Tunnel&amp;#039;&amp;#039;&amp;#039; button.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Enabled || checked&lt;br /&gt;
|-&lt;br /&gt;
| Description || Site-to-Site VPN&lt;br /&gt;
|-&lt;br /&gt;
| Listen Port || 51820&lt;br /&gt;
|-&lt;br /&gt;
| Interface Keys || Press the blue Generate button&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Make a note of the public key on &amp;#039;&amp;#039;&amp;#039;BOTH&amp;#039;&amp;#039;&amp;#039; firewalls, as this will be required later. Then click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Step 4: Configure a Peer on FW1-HQ ==&lt;br /&gt;
&lt;br /&gt;
Edit the tunnel on FW1-HQ and click &amp;#039;&amp;#039;&amp;#039;+Add Peer&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Enable || checked&lt;br /&gt;
|-&lt;br /&gt;
| Description || Branch Office Peer&lt;br /&gt;
|-&lt;br /&gt;
| Dynamic Endpoint || unchecked&lt;br /&gt;
|-&lt;br /&gt;
| Endpoint || 203.0.113.10&lt;br /&gt;
|-&lt;br /&gt;
| Endpoint Port || 51820&lt;br /&gt;
|-&lt;br /&gt;
| Public Key || (paste public key from Branch-FW)&lt;br /&gt;
|-&lt;br /&gt;
| Pre-shared Key || (blank)&lt;br /&gt;
|-&lt;br /&gt;
| Allowed IPs || 10.6.210.0/30 (Tunnel Network), 172.18.1.0/24 (Branch LAN)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Scroll down and click &amp;#039;&amp;#039;&amp;#039;Save Peer&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Step 5: Configure a Peer on Branch-FW ==&lt;br /&gt;
&lt;br /&gt;
Edit the tunnel on Branch-FW and click &amp;#039;&amp;#039;&amp;#039;+Add Peer&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Enable || checked&lt;br /&gt;
|-&lt;br /&gt;
| Description || HQ Peer&lt;br /&gt;
|-&lt;br /&gt;
| Dynamic Endpoint || unchecked&lt;br /&gt;
|-&lt;br /&gt;
| Endpoint || 192.0.2.2&lt;br /&gt;
|-&lt;br /&gt;
| Endpoint Port || 51820&lt;br /&gt;
|-&lt;br /&gt;
| Public Key || (paste public key from FW1-HQ)&lt;br /&gt;
|-&lt;br /&gt;
| Pre-shared Key || (blank)&lt;br /&gt;
|-&lt;br /&gt;
| Allowed IPs || 10.6.210.0/30 (Tunnel Network), 172.17.1.0/24 (HQ LAN)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Scroll down and click &amp;#039;&amp;#039;&amp;#039;Save Peer&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Step 6: Assign Interfaces ==&lt;br /&gt;
&lt;br /&gt;
=== Select Default Gateways ===&lt;br /&gt;
&lt;br /&gt;
On both firewalls, navigate to &amp;#039;&amp;#039;&amp;#039;System → Routing&amp;#039;&amp;#039;&amp;#039; and set Default Gateway IPv4 to a specific gateway, such as WANGW. Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Apply&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Assign WireGuard Interface on FW1-HQ ===&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;Interfaces → Assignments&amp;#039;&amp;#039;&amp;#039;, choose the tun_gw0 interface, and click &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; (creates OPT4). Configure OPT4:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Enable || checked&lt;br /&gt;
|-&lt;br /&gt;
| Description || BRANCH_VPN&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Configuration Type || Static IPv4&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Address || 10.6.210.1/30&lt;br /&gt;
|-&lt;br /&gt;
| Gateway Name || VPN_BRANCHGW&lt;br /&gt;
|-&lt;br /&gt;
| Gateway IPv4 || 10.6.210.2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Assign WireGuard Interface on Branch-FW ===&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;Interfaces → Assignments&amp;#039;&amp;#039;&amp;#039;, choose the tun_gw0 interface, and click &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039; (creates OPT1). Configure OPT1:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Enable || checked&lt;br /&gt;
|-&lt;br /&gt;
| Description || HQ_VPN&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Configuration Type || Static IPv4&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Address || 10.6.210.2/30&lt;br /&gt;
|-&lt;br /&gt;
| Gateway Name || VPN_HQGW&lt;br /&gt;
|-&lt;br /&gt;
| Gateway IPv4 || 10.6.210.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Step 7: Create Firewall Rules on WAN ==&lt;br /&gt;
&lt;br /&gt;
On both firewalls, navigate to &amp;#039;&amp;#039;&amp;#039;Firewall → Rules → WAN&amp;#039;&amp;#039;&amp;#039; and add a rule to the top:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Action || Pass&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || UDP&lt;br /&gt;
|-&lt;br /&gt;
| Source || Any&lt;br /&gt;
|-&lt;br /&gt;
| Destination || WAN Address&lt;br /&gt;
|-&lt;br /&gt;
| Destination Port || 51820&lt;br /&gt;
|-&lt;br /&gt;
| Description || Pass traffic to WireGuard&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;
== Step 8: Add Routing Between Sites ==&lt;br /&gt;
&lt;br /&gt;
=== HQ-FW1 Static Route ===&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;System → Routing → Static Routes&amp;#039;&amp;#039;&amp;#039; and click &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* Destination Network: 172.18.1.0/24&lt;br /&gt;
* Gateway: VPN_BRANCHGW&lt;br /&gt;
&lt;br /&gt;
=== Branch-FW Static Route ===&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;System → Routing → Static Routes&amp;#039;&amp;#039;&amp;#039; and click &amp;#039;&amp;#039;&amp;#039;+Add&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* Destination Network: 172.17.1.0/24&lt;br /&gt;
* Gateway: VPN_HQGW&lt;br /&gt;
&lt;br /&gt;
== Step 9: Allow Tunnel Traffic ==&lt;br /&gt;
&lt;br /&gt;
=== HQ-FW1 Tunnel Rule ===&lt;br /&gt;
&lt;br /&gt;
On HQ-FW1, navigate to &amp;#039;&amp;#039;&amp;#039;Firewall → Rules → BRANCH_VPN&amp;#039;&amp;#039;&amp;#039; and add:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Action || Pass&lt;br /&gt;
|-&lt;br /&gt;
| Interface || BRANCH_VPN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || Any&lt;br /&gt;
|-&lt;br /&gt;
| Source || Any&lt;br /&gt;
|-&lt;br /&gt;
| Destination || Any&lt;br /&gt;
|-&lt;br /&gt;
| Description || Allow WireGuard VPN Traffic&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Branch-FW Tunnel Rule ===&lt;br /&gt;
&lt;br /&gt;
On Branch-FW, navigate to &amp;#039;&amp;#039;&amp;#039;Firewall → Rules → HQ_VPN&amp;#039;&amp;#039;&amp;#039; and add the same rule (Interface: HQ_VPN).&lt;br /&gt;
&lt;br /&gt;
== Step 10: Testing ==&lt;br /&gt;
&lt;br /&gt;
WireGuard doesn’t have much status information. In most cases it either works if you configured it properly, or it does not. One place to look is for the existence of a recent “handshake.”&lt;br /&gt;
&lt;br /&gt;
=== Check Status ===&lt;br /&gt;
&lt;br /&gt;
On each firewall, navigate to &amp;#039;&amp;#039;&amp;#039;VPN → WireGuard → Status&amp;#039;&amp;#039;&amp;#039;. One of the only indicators that the VPN is up is the presence of the peer’s handshake.&lt;br /&gt;
&lt;br /&gt;
=== Try to Ping Across ===&lt;br /&gt;
&lt;br /&gt;
From the HQ-Client, try to ping the Branch-FW LAN interface at &amp;#039;&amp;#039;&amp;#039;172.18.1.1&amp;#039;&amp;#039;&amp;#039;. If the tunnel is up, your pings should be successful.&lt;br /&gt;
&lt;br /&gt;
If the pings failed, you have a configuration issue and need to check your configuration.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
Due to its stateless nature, WireGuard doesn’t have status screens, and there is very little logging to be consulted. If your tunnel fails:&lt;br /&gt;
&lt;br /&gt;
* Check the peer settings on both sides, paying particular attention to the public keys of the far-end peers&lt;br /&gt;
* Check for an active WireGuard state by navigating to &amp;#039;&amp;#039;&amp;#039;Diagnostics → States&amp;#039;&amp;#039;&amp;#039; and searching for a state that matches port 51820&lt;br /&gt;
&lt;br /&gt;
The existence of this state can indicate that the VPN is connected. This state may age out, so you may need to try your ping again to bring it back up.&lt;br /&gt;
&lt;br /&gt;
Once you are satisfied that WireGuard is working, you may delete it in order to simplify the next labs.&lt;br /&gt;
&lt;br /&gt;
== Next Module ==&lt;br /&gt;
* [[Training: WireGuard|← Back to Training: WireGuard]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;#039;&amp;#039;&amp;#039;Source:&amp;#039;&amp;#039;&amp;#039; Netgate pfSense Training — FUND001-LIVE-Lab7-WireGuard.pdf (© 2015-2021 Electric Sheep Fencing LLC)&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Justinaquino</name></author>
	</entry>
</feed>