<?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_8%3A_Multi-WAN</id>
	<title>Training Lab 8: Multi-WAN - 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_8%3A_Multi-WAN"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_8:_Multi-WAN&amp;action=history"/>
	<updated>2026-06-05T11:00:28Z</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_8:_Multi-WAN&amp;diff=234&amp;oldid=prev</id>
		<title>Justinaquino: Created page with &quot;__NOTOC__  &lt;div style=&quot;background:#fff3e6;border:1px solid #ff9900;padding:10px;margin-bottom:15px;&quot;&gt; &#039;&#039;&#039;Netgate pfSense Plus Fundamentals — Lab 8: Multi-WAN&#039;&#039;&#039;&lt;br/&gt; &lt;i&gt;Adding WAN2, configuring gateway groups, failover, failback, firewall rules, NAT, and testing.&lt;/i&gt; &lt;/div&gt;  This lab covers adding a second WAN interface to HQ, configuring the interface, gateway groups, firewall rules, NAT and related topics for multi-WAN, then testing its failover and failback.  == Con...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_8:_Multi-WAN&amp;diff=234&amp;oldid=prev"/>
		<updated>2026-04-23T07:06:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  &amp;lt;div style=&amp;quot;background:#fff3e6;border:1px solid #ff9900;padding:10px;margin-bottom:15px;&amp;quot;&amp;gt; &amp;#039;&amp;#039;&amp;#039;Netgate pfSense Plus Fundamentals — Lab 8: Multi-WAN&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt; &amp;lt;i&amp;gt;Adding WAN2, configuring gateway groups, failover, failback, firewall rules, NAT, and testing.&amp;lt;/i&amp;gt; &amp;lt;/div&amp;gt;  This lab covers adding a second WAN interface to HQ, configuring the interface, gateway groups, firewall rules, NAT and related topics for multi-WAN, then testing its failover and failback.  == Con...&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:#fff3e6;border:1px solid #ff9900;padding:10px;margin-bottom:15px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Netgate pfSense Plus Fundamentals — Lab 8: Multi-WAN&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Adding WAN2, configuring gateway groups, failover, failback, firewall rules, NAT, and testing.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This lab covers adding a second WAN interface to HQ, configuring the interface, gateway groups, firewall rules, NAT and related topics for multi-WAN, then testing its failover and failback.&lt;br /&gt;
&lt;br /&gt;
== Configuring WAN2 Interface ==&lt;br /&gt;
&lt;br /&gt;
=== Adding the WAN2 Interface ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Interfaces &amp;gt; Assign&amp;#039;&amp;#039;&amp;#039;, and verify that your OPT2 interface is assigned to vtnet3. Browse to &amp;#039;&amp;#039;&amp;#039;Interfaces &amp;gt; OPT2&amp;#039;&amp;#039;&amp;#039;. Configure the interface as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Enable || check&lt;br /&gt;
|-&lt;br /&gt;
| Description || WAN2&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Type || Static&lt;br /&gt;
|-&lt;br /&gt;
| IPv4 Address || 198.51.100.2/24&lt;br /&gt;
|-&lt;br /&gt;
| Gateway || add new&lt;br /&gt;
|-&lt;br /&gt;
| — Name || GW_WAN2&lt;br /&gt;
|-&lt;br /&gt;
| — IP || 198.51.100.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and Apply Changes.&lt;br /&gt;
&lt;br /&gt;
=== Verifying WAN2 Connectivity ===&lt;br /&gt;
&lt;br /&gt;
After adding a new WAN, the fastest way to verify it’s online is by browsing to &amp;#039;&amp;#039;&amp;#039;Status &amp;gt; Gateways&amp;#039;&amp;#039;&amp;#039;. It should show green and online there. To verify Internet connectivity, browse to &amp;#039;&amp;#039;&amp;#039;Diagnostics &amp;gt; Ping&amp;#039;&amp;#039;&amp;#039;. Enter any Internet host that replies to pings in the “Host” box (such as google.com), choose Source Address &amp;#039;&amp;#039;&amp;#039;WAN2&amp;#039;&amp;#039;&amp;#039;, and click Ping. You should receive replies.&lt;br /&gt;
&lt;br /&gt;
== Configuring DNS Servers ==&lt;br /&gt;
&lt;br /&gt;
At least one DNS server must be reachable via each WAN so a single connection&amp;#039;s failure doesn&amp;#039;t result in DNS failing.&lt;br /&gt;
&lt;br /&gt;
* In a production environment, at least one DNS server should be assigned to each WAN.&lt;br /&gt;
* In this lab network, DNS servers are local to the WAN and WAN2 networks, so we will not assign them to specific gateways.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; General Setup&amp;#039;&amp;#039;&amp;#039;. There you will see the existing entry for 192.0.2.1. In a real production environment, you may consider assigning this to GW_WAN, however that is not possible or necessary here as 192.0.2.1 exists in the same network as the WAN.&lt;br /&gt;
&lt;br /&gt;
Add &amp;#039;&amp;#039;&amp;#039;198.51.100.1&amp;#039;&amp;#039;&amp;#039; as a secondary DNS server. In a real production environment, you may consider assigning this to GW_WAN2, however that is not possible or necessary here as 198.51.100.1 exists in the same network as the WANs.&lt;br /&gt;
&lt;br /&gt;
Click Save.&lt;br /&gt;
&lt;br /&gt;
== Configuring Monitor IPs ==&lt;br /&gt;
&lt;br /&gt;
The system will ping its monitor IP for each gateway to determine gateway status. By default, the gateway&amp;#039;s IP is used. For multi-WAN scenarios, that is probably not a good choice.&lt;br /&gt;
&lt;br /&gt;
* Your default gateway may be a local router within your facility, unlikely to ever go down when your Internet goes down.&lt;br /&gt;
* Or problems in your ISP&amp;#039;s network further upstream could cause loss of connectivity.&lt;br /&gt;
* Using an IP out on the Internet as the monitor IP offers a better test of connectivity.&lt;br /&gt;
&lt;br /&gt;
Use of anycasted IPs is best:&lt;br /&gt;
* Google public DNS: 8.8.8.8 and 8.8.4.4&lt;br /&gt;
* OpenDNS: 208.67.220.220 and 208.67.222.222&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Routing&amp;#039;&amp;#039;&amp;#039;. Edit &amp;#039;&amp;#039;&amp;#039;GW_WAN&amp;#039;&amp;#039;&amp;#039;. For monitor IP, fill in &amp;#039;&amp;#039;&amp;#039;8.8.8.8&amp;#039;&amp;#039;&amp;#039;. Save. Then edit &amp;#039;&amp;#039;&amp;#039;GW_WAN2&amp;#039;&amp;#039;&amp;#039;, and set its monitor IP to &amp;#039;&amp;#039;&amp;#039;8.8.4.4&amp;#039;&amp;#039;&amp;#039;. Save, then Apply Changes.&lt;br /&gt;
&lt;br /&gt;
== Configuring Gateway Groups ==&lt;br /&gt;
&lt;br /&gt;
Configure three gateway groups for use at HQ:&lt;br /&gt;
# One that prefers WAN and fails over to WAN2.&lt;br /&gt;
# One that prefers WAN2 and fails over to WAN.&lt;br /&gt;
# One that load balances across both.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Routing&amp;#039;&amp;#039;&amp;#039;, and click the &amp;#039;&amp;#039;&amp;#039;Groups&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 group.&lt;br /&gt;
&lt;br /&gt;
=== WAN to WAN2 ===&lt;br /&gt;
&lt;br /&gt;
This gateway group prefers WAN (tier 1) and fails over to WAN2 (tier 2). Then click Save.&lt;br /&gt;
&lt;br /&gt;
=== WAN2 to WAN ===&lt;br /&gt;
&lt;br /&gt;
Click the duplicate symbol to the right of the WANtoWAN2 group to create a new group based on this one, then flip the tiers, group name and description. This prefers WAN2, and fails over to WAN.&lt;br /&gt;
&lt;br /&gt;
=== Load Balance ===&lt;br /&gt;
&lt;br /&gt;
This load balances across both WAN and WAN2. If a WAN fails, it&amp;#039;s removed from the load balancing pool.&lt;br /&gt;
&lt;br /&gt;
== Configure NAT for Multi-WAN ==&lt;br /&gt;
&lt;br /&gt;
The NAT configuration is all on a per-interface basis, specifying one particular interface and having IP information that&amp;#039;s specific to that interface. When you add a new WAN, you also need NAT configuration specific to that new WAN.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Virtual IPs on WAN2 ===&lt;br /&gt;
&lt;br /&gt;
WAN2 will have 3 virtual IPs configured as IP aliases:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! IP/mask !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 198.51.100.4/32 || server1 WAN2 external address&lt;br /&gt;
|-&lt;br /&gt;
| 198.51.100.5/32 || server2 WAN2 external address&lt;br /&gt;
|-&lt;br /&gt;
| 198.51.100.6/32 || extra WAN2 external address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Repeat the process for the remaining IPs.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Port Forwards on WAN2 ===&lt;br /&gt;
&lt;br /&gt;
To open the same ports on WAN2 as on WAN, duplicate the existing port forward entries and change their interface from WAN to WAN2.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; NAT&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Port Forwards&amp;#039;&amp;#039;&amp;#039; tab. Click the duplicate symbol to the right of the “VNC to hqclient” entry. In the resulting screen, change the interface from WAN to WAN2. Note how the destination address automatically changes to “WAN2 address.” Verify that change, update the description if desired, then save.&lt;br /&gt;
&lt;br /&gt;
Repeat that process for the port 222 SSH port forward to hq-client.&lt;br /&gt;
&lt;br /&gt;
=== Configuring 1:1 NAT on WAN2 ===&lt;br /&gt;
&lt;br /&gt;
Configure 1:1 NAT for server1 and server2 on WAN2.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! server1 !! server2&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN2 || WAN2&lt;br /&gt;
|-&lt;br /&gt;
| External IP || 198.51.100.4 || 198.51.100.5&lt;br /&gt;
|-&lt;br /&gt;
| Internal IP || 172.17.2.10 || 172.17.2.20&lt;br /&gt;
|-&lt;br /&gt;
| Description || server1.example.com WAN2 || server2.example.com WAN2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Outbound NAT on WAN2 ===&lt;br /&gt;
&lt;br /&gt;
Since the configuration is using manual outbound NAT, add outbound NAT rules for WAN2.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; NAT&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Outbound&amp;#039;&amp;#039;&amp;#039; tab. Click the duplicate symbol to the right of “hq-client out via .6” to add a new entry based on that one. Change the interface to WAN2, and the Translation address to 198.51.100.6.&lt;br /&gt;
&lt;br /&gt;
Repeat the same process for the two other outbound NAT rules.&lt;br /&gt;
&lt;br /&gt;
== Configuring WAN2 Firewall Rules ==&lt;br /&gt;
&lt;br /&gt;
We want the same external access on WAN2 as is already active on WAN, permitting certain traffic through the 1:1 NATs for server1 and server2. Interface groupings do not support return routing at this time, so the rules must be kept on each WAN separately.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Rules&amp;#039;&amp;#039;&amp;#039;, WAN tab. Click the duplicate symbol to the right of “allow web ports to public web servers” to duplicate it, change the interface from WAN to WAN2, and click Save. Because the NAT applies first, the firewall rule is otherwise identical to the one on WAN.&lt;br /&gt;
&lt;br /&gt;
Repeat the same process for rules “allow pings to public web servers” and “allow SSH to web servers from remote admin.”&lt;br /&gt;
&lt;br /&gt;
== Configure Firewall Rules for Outbound Traffic ==&lt;br /&gt;
&lt;br /&gt;
In a multi-WAN environment, outbound traffic is directed to a particular WAN or gateway group via policy routing with firewall rules.&lt;br /&gt;
&lt;br /&gt;
=== Test WAN2 with Single Client ===&lt;br /&gt;
&lt;br /&gt;
First, send only HQ-client out via WAN2. It&amp;#039;s generally best to first test a new WAN with a single client.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Rules&amp;#039;&amp;#039;&amp;#039;, LAN tab, and click Add to add a rule to the top of the list:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Action || Pass&lt;br /&gt;
|-&lt;br /&gt;
| Interface || LAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || any&lt;br /&gt;
|-&lt;br /&gt;
| Source || Single host or alias, 172.17.1.100&lt;br /&gt;
|-&lt;br /&gt;
| Destination || any&lt;br /&gt;
|-&lt;br /&gt;
| Description || hq-client1 prefer WAN2&lt;br /&gt;
|-&lt;br /&gt;
| Gateway (Advanced Options) || WAN2toWAN&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
=== Testing LAN out WAN2 ===&lt;br /&gt;
&lt;br /&gt;
Open hq-client1&amp;#039;s web browser and browse to http://100.64.0.50. You should be able to connect, and see you&amp;#039;re coming from 198.51.100.6, the WAN2 VIP where hq-client1 is NATed.&lt;br /&gt;
&lt;br /&gt;
=== Configure LAN for Failover Group ===&lt;br /&gt;
&lt;br /&gt;
The “hq-client1 prefer WAN2” rule was only for testing. Delete that rule now.&lt;br /&gt;
&lt;br /&gt;
Then edit the “Default allow LAN to any” rule, and choose Gateway &amp;#039;&amp;#039;&amp;#039;WANtoWAN2&amp;#039;&amp;#039;&amp;#039;. Verify Internet connectivity is still functioning from hq-client1.&lt;br /&gt;
&lt;br /&gt;
=== LAN to DMZ Connectivity ===&lt;br /&gt;
&lt;br /&gt;
Try to ping 172.17.2.10 from hq-client1. You won&amp;#039;t receive a successful reply because traffic matching a firewall rule specifying a gateway is forced to that gateway. The attempt to get to DMZ is actually being sent to the WAN ISP&amp;#039;s router, which can&amp;#039;t route internal traffic.&lt;br /&gt;
&lt;br /&gt;
=== Add LocalNetworks Alias ===&lt;br /&gt;
&lt;br /&gt;
Add an alias containing destinations that will not be policy-routed to the Internet.&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Aliases&amp;#039;&amp;#039;&amp;#039; and 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;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Name || LocalNetworks&lt;br /&gt;
|-&lt;br /&gt;
| Description || networks that will not be policy routed to Internet&lt;br /&gt;
|-&lt;br /&gt;
| Type || Network&lt;br /&gt;
|-&lt;br /&gt;
| Network 1 || 172.17.0.0/16 (HQ)&lt;br /&gt;
|-&lt;br /&gt;
| Network 2 || 172.18.0.0/16 (branch)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
=== Add Firewall Rule for Negation ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall &amp;gt; Rules&amp;#039;&amp;#039;&amp;#039;, LAN, and click Add to add a new rule to the top of the list:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Action || Pass&lt;br /&gt;
|-&lt;br /&gt;
| Interface || LAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || any&lt;br /&gt;
|-&lt;br /&gt;
| Source || LAN net&lt;br /&gt;
|-&lt;br /&gt;
| Destination || Single host or alias, LocalNetworks alias&lt;br /&gt;
|-&lt;br /&gt;
| Description || allow local networks with no policy routing&lt;br /&gt;
|-&lt;br /&gt;
| Gateway || Leave at default&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Start a new ping to 172.17.2.10 and it will reply. If you still aren&amp;#039;t getting a ping reply, it&amp;#039;s probably because of an old firewall state. Reset states under &amp;#039;&amp;#039;&amp;#039;Diagnostics &amp;gt; States&amp;#039;&amp;#039;&amp;#039;, or delete those specific states, and try again.&lt;br /&gt;
&lt;br /&gt;
== Default Gateway Switching ==&lt;br /&gt;
&lt;br /&gt;
At this point, all traffic sourced from inside the LAN or DMZ destined for the internet will follow the policy route. However, the default route on the firewall is still pointing to WAN1. In the event of a WAN1 failure, traffic sourced by the firewall itself will not be able to reach the internet.&lt;br /&gt;
&lt;br /&gt;
Navigate to &amp;#039;&amp;#039;&amp;#039;System &amp;gt; Routing&amp;#039;&amp;#039;&amp;#039; and set &amp;#039;&amp;#039;&amp;#039;Default gateway IPv4&amp;#039;&amp;#039;&amp;#039; to &amp;#039;&amp;#039;&amp;#039;Automatic&amp;#039;&amp;#039;&amp;#039; and click Save.&lt;br /&gt;
&lt;br /&gt;
== Testing Failover ==&lt;br /&gt;
&lt;br /&gt;
Now that failover is configured, it&amp;#039;s important to test it. Create a failure on WAN to verify it switches over to WAN2.&lt;br /&gt;
&lt;br /&gt;
In the virtual lab environment, shutdown the WAN1 NIC on “Lab Internet router.” Point your web browser to your Lab Internet Router (http://100.64.0.1) and browse to &amp;#039;&amp;#039;&amp;#039;Interfaces &amp;gt; HQ_WAN1&amp;#039;&amp;#039;&amp;#039;. Uncheck the Enable box at the top and click OK, then Apply.&lt;br /&gt;
&lt;br /&gt;
Now browse to &amp;#039;&amp;#039;&amp;#039;Status &amp;gt; Gateways&amp;#039;&amp;#039;&amp;#039; on fw1-HQ. Within a few seconds, WAN should show as offline. Once it does, try to browse out from LAN to the Internet. You should now be using WAN2.&lt;br /&gt;
&lt;br /&gt;
Once tested, normalize your lab by logging back into your Lab Internet Router (http://100.64.0.1) and check the Enable box in the HQ-WAN1 interface. Your WAN gateway should then come back online.&lt;br /&gt;
&lt;br /&gt;
This completes the multi-WAN lab.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#f0f0f0;border:1px solid #ccc;padding:8px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Source:&amp;#039;&amp;#039;&amp;#039; Netgate pfSense Plus Fundamentals and Practical Application — Lab 8 (Multi-WAN).&amp;lt;br/&amp;gt;&lt;br /&gt;
© 2021 Rubicon Communications, LLC (Netgate).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reference WAN2 IP:&amp;#039;&amp;#039;&amp;#039; 198.51.100.2/24, Gateway: 198.51.100.1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Previous Module:&amp;#039;&amp;#039;&amp;#039; [[Training:_Multi-WAN|Training: Multi-WAN]]&lt;/div&gt;</summary>
		<author><name>Justinaquino</name></author>
	</entry>
</feed>