<?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_3%3A_NAT_and_Virtual_IPs</id>
	<title>Training Lab 3: NAT and Virtual IPs - 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_3%3A_NAT_and_Virtual_IPs"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_3:_NAT_and_Virtual_IPs&amp;action=history"/>
	<updated>2026-06-05T11:01:09Z</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_3:_NAT_and_Virtual_IPs&amp;diff=230&amp;oldid=prev</id>
		<title>Justinaquino: Created from Netgate pfSense training PDF</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_3:_NAT_and_Virtual_IPs&amp;diff=230&amp;oldid=prev"/>
		<updated>2026-04-23T06:58:56Z</updated>

		<summary type="html">&lt;p&gt;Created from Netgate pfSense training PDF&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-color: #fff3e0; border-left: 6px solid #FF9800; padding: 16px; margin-bottom: 20px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;Lab Overview:&amp;lt;/strong&amp;gt; This hands-on lab covers Virtual IPs, Port Forwards, 1:1 NAT, and Outbound NAT in pfSense Plus. You will configure VIPs on the WAN subnet &amp;lt;code&amp;gt;192.0.2.0/24&amp;lt;/code&amp;gt; and implement various NAT scenarios using Virtual IPs &amp;lt;code&amp;gt;192.0.2.4&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;192.0.2.6&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lab Environment ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ WAN Subnet Allocation&lt;br /&gt;
|-&lt;br /&gt;
! IP Address !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| 192.0.2.1 || ISP router (default gateway)&lt;br /&gt;
|-&lt;br /&gt;
| 192.0.2.2 || fw1-HQ WAN IP&lt;br /&gt;
|-&lt;br /&gt;
| 192.0.2.3 || Reserved for fw2-HQ (Advanced Application class)&lt;br /&gt;
|-&lt;br /&gt;
| 192.0.2.4 || Virtual IP — server1 WAN external address&lt;br /&gt;
|-&lt;br /&gt;
| 192.0.2.5 || Virtual IP — server2 WAN external address&lt;br /&gt;
|-&lt;br /&gt;
| 192.0.2.6 || Virtual IP — hq-client / VoIP PBX alternate outbound&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Exercise 1: Configuring Virtual IPs ==&lt;br /&gt;
&lt;br /&gt;
At HQ, we have a /24 public IP subnet assigned by our ISP: &amp;lt;code&amp;gt;192.0.2.0/24&amp;lt;/code&amp;gt;. In most real-world networks, this will be a smaller subnet such as a /29, /28, or /27. The concepts are the same regardless of subnet size.&lt;br /&gt;
&lt;br /&gt;
Our WAN1 ISP router has IP &amp;lt;code&amp;gt;192.0.2.1&amp;lt;/code&amp;gt;, used as the default gateway. fw1-HQ has a WAN IP of &amp;lt;code&amp;gt;192.0.2.2&amp;lt;/code&amp;gt;. In order for us to use additional IPs in the WAN1 subnet, the firewall must answer ARP requests for those addresses — this tells the ISP router to send traffic destined to those addresses to the firewall.&lt;br /&gt;
&lt;br /&gt;
=== Step 1.1 — Add VIP 192.0.2.4 ===&lt;br /&gt;
&lt;br /&gt;
On fw1-HQ, browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Virtual IPs&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;+ Add&amp;#039;&amp;#039;&amp;#039; to add a new VIP.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ VIP Configuration for server1&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Type || IP alias&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| IP Address || 192.0.2.4/32&lt;br /&gt;
|-&lt;br /&gt;
| Description || server1 WAN external address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; You can enter the IP without choosing a mask; the JavaScript on the page will automatically set the mask to /32 after detecting an IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;, then click &amp;#039;&amp;#039;&amp;#039;+ Add&amp;#039;&amp;#039;&amp;#039; again to add the second VIP.&lt;br /&gt;
&lt;br /&gt;
=== Step 1.2 — Add VIP 192.0.2.5 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ VIP Configuration for server2&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Type || IP alias&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| IP Address || 192.0.2.5/32&lt;br /&gt;
|-&lt;br /&gt;
| Description || server2 WAN external&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;, then add the third VIP.&lt;br /&gt;
&lt;br /&gt;
=== Step 1.3 — Add VIP 192.0.2.6 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ VIP Configuration for PBX / alternate outbound&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Type || IP alias&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| IP Address || 192.0.2.6/32&lt;br /&gt;
|-&lt;br /&gt;
| Description || VoIP PBX / alternate outbound IP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;, then click &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now &amp;lt;code&amp;gt;192.0.2.4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;192.0.2.5&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;192.0.2.6&amp;lt;/code&amp;gt; are available for use. Adding VIPs only makes the firewall answer on the configured addresses; they are not yet used for NAT.&lt;br /&gt;
&lt;br /&gt;
== Exercise 2: Configuring a Basic Port Forward ==&lt;br /&gt;
&lt;br /&gt;
We will set up a port forward allowing remote desktop access from the host machine to hq-client using VNC.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning:&amp;#039;&amp;#039;&amp;#039; Opening VNC to the Internet is not recommended in production. Use a VPN instead. This is for demonstration purposes only.&lt;br /&gt;
&lt;br /&gt;
=== Step 2.1 — Create VNC Port Forward ===&lt;br /&gt;
&lt;br /&gt;
On fw1-HQ, browse to &amp;#039;&amp;#039;&amp;#039;Firewall → NAT&amp;#039;&amp;#039;&amp;#039;, Port Forward tab. 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;
|+ VNC Port Forward Rule&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || TCP&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 || 5900&lt;br /&gt;
|-&lt;br /&gt;
| Redirect target IP || 172.17.1.100&lt;br /&gt;
|-&lt;br /&gt;
| Redirect target port || 5900&lt;br /&gt;
|-&lt;br /&gt;
| Description || forward VNC to hq-client&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 2.2 — Verify the Port Forward ===&lt;br /&gt;
&lt;br /&gt;
From your host OS or the internet-host VM, connect to &amp;lt;code&amp;gt;192.0.2.2:5900&amp;lt;/code&amp;gt; with VNC Viewer.&lt;br /&gt;
&lt;br /&gt;
On fw1-HQ, browse to &amp;#039;&amp;#039;&amp;#039;Diagnostics → States&amp;#039;&amp;#039;&amp;#039; and filter for &amp;lt;code&amp;gt;:5900&amp;lt;/code&amp;gt;. You will see two states: inbound (WAN) and outbound (LAN).&lt;br /&gt;
&lt;br /&gt;
== Exercise 3: Port Forward on a Different External Port ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you need to use a different external port than the internal port. For example, opening SSH on port 222 externally to port 22 internally reduces SSH brute-force log noise.&lt;br /&gt;
&lt;br /&gt;
=== Step 3.1 — Create Alternate SSH Port Forward ===&lt;br /&gt;
&lt;br /&gt;
Instead of clicking &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039;, click the &amp;#039;&amp;#039;&amp;#039;copy&amp;#039;&amp;#039;&amp;#039; icon to the right of the VNC port forward to duplicate it. Then change:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Alternate SSH Port Forward Rule&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Destination port || 222&lt;br /&gt;
|-&lt;br /&gt;
| Redirect target port || 22&lt;br /&gt;
|-&lt;br /&gt;
| Description || external SSH port 222 to hq-client&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 3.2 — Test SSH Connection ===&lt;br /&gt;
&lt;br /&gt;
From your computer, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -p 222 training@192.0.2.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or from Windows, use PuTTY with IP &amp;lt;code&amp;gt;192.0.2.2&amp;lt;/code&amp;gt; and port &amp;lt;code&amp;gt;222&amp;lt;/code&amp;gt;, ensuring SSH is selected.&lt;br /&gt;
&lt;br /&gt;
== Exercise 4: Restricted Source Port Forward ==&lt;br /&gt;
&lt;br /&gt;
Restrict the hq-client VNC port forward to the RemoteAdmins alias.&lt;br /&gt;
&lt;br /&gt;
=== Step 4.1 — Edit VNC Port Forward ===&lt;br /&gt;
&lt;br /&gt;
Edit the VNC port forward. In the &amp;#039;&amp;#039;&amp;#039;Source&amp;#039;&amp;#039;&amp;#039; field, click &amp;#039;&amp;#039;&amp;#039;Advanced&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* Type: &amp;#039;&amp;#039;&amp;#039;Single host or alias&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Address: Type &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; to populate the &amp;#039;&amp;#039;&amp;#039;RemoteAdmin&amp;#039;&amp;#039;&amp;#039; alias&lt;br /&gt;
* Source port: &amp;#039;&amp;#039;&amp;#039;any&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
=== Step 4.2 — Verify Restriction ===&lt;br /&gt;
&lt;br /&gt;
* From the remote-host VM (if not in RemoteAdmin alias): connection should fail&lt;br /&gt;
* From the host OS (if in RemoteAdmin alias): connection should succeed&lt;br /&gt;
&lt;br /&gt;
== Exercise 5: Alternate External IP Port Forward ==&lt;br /&gt;
&lt;br /&gt;
Use the Virtual IPs added earlier instead of the WAN IP.&lt;br /&gt;
&lt;br /&gt;
=== Step 5.1 — Create HTTP Port Forward on VIP ===&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039; to add a new port forward.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ HTTP to server1 via VIP&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || TCP&lt;br /&gt;
|-&lt;br /&gt;
| Source || any&lt;br /&gt;
|-&lt;br /&gt;
| Destination || 192.0.2.4&lt;br /&gt;
|-&lt;br /&gt;
| Destination port || 80&lt;br /&gt;
|-&lt;br /&gt;
| Redirect target IP || 172.17.2.10&lt;br /&gt;
|-&lt;br /&gt;
| Redirect target port || 80&lt;br /&gt;
|-&lt;br /&gt;
| Description || HTTP to server1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
=== Step 5.2 — Verify HTTP Access ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;lt;code&amp;gt;http://192.0.2.4&amp;lt;/code&amp;gt; from your host OS or internet-host VM. It should display the server1 page.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Reflection is not yet configured, so this will only work from outside the network.&lt;br /&gt;
&lt;br /&gt;
== Exercise 6: Configuring 1:1 NAT ==&lt;br /&gt;
&lt;br /&gt;
1:1 NAT maps one external IP to one internal IP. Port forwards take precedence over 1:1 NAT where they overlap.&lt;br /&gt;
&lt;br /&gt;
=== Step 6.1 — Delete Overlapping Port Forward ===&lt;br /&gt;
&lt;br /&gt;
First, delete the &amp;#039;&amp;#039;&amp;#039;HTTP to server1&amp;#039;&amp;#039;&amp;#039; port forward entry, then apply changes. This is preferable to letting 1:1 NAT handle the traffic.&lt;br /&gt;
&lt;br /&gt;
=== Step 6.2 — Configure 1:1 NAT for server1 ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → NAT&amp;#039;&amp;#039;&amp;#039;, 1:1 tab. 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;
|+ 1:1 NAT for server1&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| External || 192.0.2.4&lt;br /&gt;
|-&lt;br /&gt;
| Internal || 172.17.2.10&lt;br /&gt;
|-&lt;br /&gt;
| Description || server1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Adding a 1:1 NAT entry only defines how traffic is translated. Without firewall rules, no traffic will pass in or out.&lt;br /&gt;
&lt;br /&gt;
=== Step 6.3 — Configure 1:1 NAT for server2 ===&lt;br /&gt;
&lt;br /&gt;
Click &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039; to add another 1:1 NAT entry.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ 1:1 NAT for server2&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| External || 192.0.2.5&lt;br /&gt;
|-&lt;br /&gt;
| Internal || 172.17.2.20&lt;br /&gt;
|-&lt;br /&gt;
| Description || server2.example.com&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
== Exercise 7: Firewall Rules for 1:1 NAT ==&lt;br /&gt;
&lt;br /&gt;
=== Step 7.1 — Allow Pings to Public Web Servers ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Rules&amp;#039;&amp;#039;&amp;#039;, WAN tab. 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;
|+ ICMP Rule for Web Servers&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || ICMP&lt;br /&gt;
|-&lt;br /&gt;
| ICMP Type || Echo request&lt;br /&gt;
|-&lt;br /&gt;
| Source || any&lt;br /&gt;
|-&lt;br /&gt;
| Destination || Single host or alias — WebServers alias&lt;br /&gt;
|-&lt;br /&gt;
| Description || allow pings to public web servers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
Test by pinging &amp;lt;code&amp;gt;192.0.2.4&amp;lt;/code&amp;gt; from your host machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ping 192.0.2.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Leave the ping running and browse to &amp;#039;&amp;#039;&amp;#039;Diagnostics → States&amp;#039;&amp;#039;&amp;#039;. Filter for &amp;lt;code&amp;gt;192.0.2.100:&amp;lt;/code&amp;gt; (if from host OS) and observe the states. Traffic sourced from &amp;lt;code&amp;gt;192.0.2.100&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;192.0.2.4&amp;lt;/code&amp;gt; is translated to &amp;lt;code&amp;gt;172.17.2.10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Step 7.2 — Allow SSH to Web Servers from RemoteAdmins ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ SSH Rule for RemoteAdmins&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || TCP&lt;br /&gt;
|-&lt;br /&gt;
| Source || Single host or alias — RemoteAdmins alias&lt;br /&gt;
|-&lt;br /&gt;
| Destination || Single host or alias — WebServers alias&lt;br /&gt;
|-&lt;br /&gt;
| Destination port || 22&lt;br /&gt;
|-&lt;br /&gt;
| Description || allow SSH to web servers from remote admin&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
From your host machine, test:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh training@192.0.2.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 7.3 — Allow Web Access to Public Web Servers ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ HTTP/HTTPS Rule for Web Servers&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Protocol || TCP&lt;br /&gt;
|-&lt;br /&gt;
| Source || any&lt;br /&gt;
|-&lt;br /&gt;
| Destination || Single host or alias — WebServers&lt;br /&gt;
|-&lt;br /&gt;
| Destination port || WebPorts alias&lt;br /&gt;
|-&lt;br /&gt;
| Description || allow web ports to public web servers&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save and apply changes.&lt;br /&gt;
&lt;br /&gt;
Now browse to &amp;lt;code&amp;gt;http://192.0.2.4&amp;lt;/code&amp;gt; (server1) and &amp;lt;code&amp;gt;http://192.0.2.5&amp;lt;/code&amp;gt; (server2).&lt;br /&gt;
&lt;br /&gt;
== Exercise 8: Configuring Outbound NAT ==&lt;br /&gt;
&lt;br /&gt;
Outbound NAT defines whether and how the source IP of matching traffic will be translated when it leaves an interface.&lt;br /&gt;
&lt;br /&gt;
=== Step 8.1 — Switch to Manual Outbound NAT ===&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → NAT&amp;#039;&amp;#039;&amp;#039;, Outbound tab. Select &amp;#039;&amp;#039;&amp;#039;Manual Outbound NAT&amp;#039;&amp;#039;&amp;#039;, then click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The system auto-populates the outbound NAT ruleset with the rules it was automatically generating previously. The configured manual rules take effect only upon applying changes.&lt;br /&gt;
&lt;br /&gt;
=== Step 8.2 — Clean Up Auto-Generated Rules ===&lt;br /&gt;
&lt;br /&gt;
The auto-generated rules include:&lt;br /&gt;
&lt;br /&gt;
* LAN subnet, DMZ subnet, and loopback &amp;lt;code&amp;gt;127.0.0.0/8&amp;lt;/code&amp;gt;&lt;br /&gt;
* IPv6 rules&lt;br /&gt;
* Static port for UDP port 500 (for non-NAT-T IPsec VPN clients)&lt;br /&gt;
&lt;br /&gt;
Clean up by:&lt;br /&gt;
&lt;br /&gt;
* Deleting the &amp;lt;code&amp;gt;127.0.0.0/8&amp;lt;/code&amp;gt; rule (unusual circumstance)&lt;br /&gt;
* Deleting IPv6 rules (not using IPv6)&lt;br /&gt;
* Deleting UDP port 500 rules (nearly unheard of today)&lt;br /&gt;
* Replacing LAN and DMZ subnets with the summarized &amp;lt;code&amp;gt;172.17.0.0/16&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit the &amp;#039;&amp;#039;&amp;#039;LAN to WAN&amp;#039;&amp;#039;&amp;#039; rule:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Consolidated Outbound NAT Rule&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&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;
| Translation || Interface address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Delete all other outbound NAT rules. Your list should have one rule.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; 1:1 NAT entries take precedence over outbound NAT. server1 traffic goes out via &amp;lt;code&amp;gt;192.0.2.4&amp;lt;/code&amp;gt; and server2 via &amp;lt;code&amp;gt;192.0.2.5&amp;lt;/code&amp;gt; regardless of outbound NAT rules.&lt;br /&gt;
&lt;br /&gt;
=== Step 8.3 — Send hq-client Out via Alternate IP ===&lt;br /&gt;
&lt;br /&gt;
Click the top &amp;#039;&amp;#039;&amp;#039;Add&amp;#039;&amp;#039;&amp;#039; button to add the new rule at the top of the list.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Outbound NAT for hq-client&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Interface || WAN&lt;br /&gt;
|-&lt;br /&gt;
| Source || 172.17.1.100/32&lt;br /&gt;
|-&lt;br /&gt;
| Destination || any&lt;br /&gt;
|-&lt;br /&gt;
| Translation || 192.0.2.6&lt;br /&gt;
|-&lt;br /&gt;
| Description || hq-client out via .6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Ensure this rule is above the &amp;lt;code&amp;gt;172.17.0.0/16&amp;lt;/code&amp;gt; rule, since the first match wins.&lt;br /&gt;
&lt;br /&gt;
=== Step 8.4 — Static Port for VoIP PBX ===&lt;br /&gt;
&lt;br /&gt;
NAT can break VoIP. If rewriting source ports breaks SIP/RTP, configure static port for the PBX.&lt;br /&gt;
&lt;br /&gt;
Assume a PBX at &amp;lt;code&amp;gt;172.17.1.200&amp;lt;/code&amp;gt;. Click the &amp;#039;&amp;#039;&amp;#039;copy&amp;#039;&amp;#039;&amp;#039; icon next to the hq-client outbound NAT rule, then change:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Outbound NAT for VoIP PBX&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Source || 172.17.1.200/32&lt;br /&gt;
|-&lt;br /&gt;
| Destination || any&lt;br /&gt;
|-&lt;br /&gt;
| Translation || Address 192.0.2.6, Static port checked&lt;br /&gt;
|-&lt;br /&gt;
| Description || VoIP PBX static port&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Ensure this rule is above the &amp;lt;code&amp;gt;172.17.0.0/16&amp;lt;/code&amp;gt; rule.&lt;br /&gt;
&lt;br /&gt;
== Lab Summary ==&lt;br /&gt;
&lt;br /&gt;
In this lab, you learned to:&lt;br /&gt;
&lt;br /&gt;
* Configure IP Alias Virtual IPs on the WAN interface&lt;br /&gt;
* Create Port Forwards (same port, alternate port, restricted source, alternate external IP)&lt;br /&gt;
* Configure 1:1 NAT mappings&lt;br /&gt;
* Add firewall rules to permit traffic through 1:1 NAT&lt;br /&gt;
* Switch from Automatic to Manual Outbound NAT&lt;br /&gt;
* Configure alternate outbound IPs and static port for VoIP&lt;br /&gt;
&lt;br /&gt;
== Next Module ==&lt;br /&gt;
&lt;br /&gt;
Proceed to the next training module. Return to the &amp;#039;&amp;#039;&amp;#039;[[Training:_NAT_and_Virtual_IPs|NAT and Virtual IPs — Lecture Slides]]&amp;#039;&amp;#039;&amp;#039; for review.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Source: Netgate FUND001-LIVE-SLIDE-SEG3-NATVIP.pdf / FUND001-LIVE-Lab3-NATandVIPs.pdf&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Justinaquino</name></author>
	</entry>
</feed>