PFsense: Fake Subnet and IPsec Tunnel Mapping

Abstract: Resolve IPsec routing failures for remote fake subnets by configuring precise Phase 2 definitions and excluding traffic from NAT in pfSense.

Created: 2026-08-24 by

To map a remote fake subnet through an IPsec tunnel without modifying the remote device, configure pfSense Phase 2 proposals to match the remote network exactly and disable NAT for that specific traffic. By defining the local and remote subnets in the IPsec wizard to reflect the actual logical networks rather than physical interfaces, you ensure packets are routed correctly through the encrypted tunnel while preserving the remote site's existing addressing scheme.

Understanding the Subnet Mismatch

The core challenge in this scenario is bridging two different address spaces: a local network using 10.0.0.0/16 and a remote network using a private range like 172.16.0.0/24. The term "fake subnet" implies that the remote site does not have a route back to your 10.x.x.x space, or they cannot change their configuration to accept it. Standard routing would fail because the remote gateway does not know how to reach your internal LAN.

In previous incorrect approaches, administrators often attempted to use Proxy ARP on the pfSense interface. This is technically flawed for IPsec because Proxy ARP operates at Layer 2 and can cause conflicts with the encapsulation headers used by IPsec. Instead, the solution relies entirely on correct Phase 2 (Quick Mode) definitions and proper NAT exclusion rules. You must treat the IPsec tunnel as a direct wire between two routers, where each side sees its own subnet and the other side's subnet.

Configuring the IPsec Phase 2 Proposals

The most critical step is ensuring that the Phase 2 proposal accurately reflects the traffic that will traverse the tunnel. In the pfSense IPsec wizard, you will define the Local Network and Remote Network. Do not select the entire WAN interface or the default LAN subnet if they do not match the logical scope of the connection.

  • Local Network: Select the specific subnet within your 10.0.0.0/16 range that needs access to the remote site. If all internal hosts need access, you may select the entire LAN subnet, but be aware of routing implications.
  • Remote Network: Enter the exact CIDR block of the remote site, such as 172.16.0.0/24. This tells pfSense that any destination IP falling within this range should be sent through the IPsec tunnel rather than out the WAN interface.

If the remote site has multiple subnets behind their firewall, you must add additional Phase 2 entries for each distinct network. Each entry acts as a static route pointing into the encrypted pipe. Failure to include a specific subnet in the Phase 2 definition will result in traffic being dropped or routed incorrectly via the default gateway.

Excluding Traffic from NAT

Even with correct Phase 2 settings, traffic will fail if pfSense performs Network Address Translation (NAT) on packets entering the tunnel. By default, pfSense applies outbound NAT to all traffic leaving the LAN. For IPsec tunnels, you must create exceptions so that traffic destined for the remote subnet retains its original source IP address.

Navigate to Firewall > NAT > Port Forward or Firewall > NAT > Outbound, depending on your NAT mode. If you are using Automatic Outbound NAT, pfSense generates rules dynamically. You must manually edit these rules to exclude the traffic matching your IPsec peers.

  1. Go to Firewall > NAT > Outbound.
  2. Switch to manual mode if necessary to gain full control over the rules.
  3. Create a rule that matches Source: Your LAN Subnet (10.0.0.0/16) and Destination: The Remote Fake Subnet (172.16.0.0/24).
  4. Set the Action to No NAT or Passthrough.
  5. Place this rule above the general NAT rule that translates all LAN traffic to the WAN IP.

This ensures that when a host in 10.0.0.5 sends a packet to 172.16.0.10, the source IP remains 10.0.0.5 inside the tunnel. If you were to translate this to the WAN IP, the remote site would reject the packet because it expects traffic from the specific internal range, or the return path would become asymmetric.

Verifying Route Domains and Policy Routing

Once the tunnel is established, you may encounter issues where return traffic does not flow correctly. This is often due to pfSense choosing the wrong interface for the return path. While IPsec handles the encryption, the underlying routing table must prefer the tunnel interface for the remote subnet.

Check the Diagnostics > Routes page to verify that there is a specific route for 172.16.0.0/24 pointing to the IPsec tunnel interface (often named enc0 or similar). If no specific route exists, pfSense might send reply traffic out the WAN interface, causing asymmetry. You can force this behavior by adding a static route in System > Routing > Routes, setting the destination to the remote subnet and the gateway to the IPsec tunnel.

For more complex setups involving multiple interfaces, consider reviewing how pfSense handles asymmetric routing scenarios, as similar principles apply to ensuring traffic enters and exits through the same logical boundary. Understanding these routing mechanics prevents common connectivity failures after initial configuration.

Troubleshooting Common Failures

If the tunnel fails to establish or traffic stops flowing, check the following areas first. Verify that the Phase 1 (Main Mode) parameters, such as DH groups and encryption algorithms, match exactly between both ends. A mismatch here will prevent the tunnel from coming up entirely.

If the tunnel is up but ping fails, inspect the packet capture on the pfSense WAN interface. Look for ESP packets (Protocol 50) being exchanged. If you see ESP packets but no ICMP replies, the issue is likely downstream at the remote firewall or within the NAT rules on pfSense. Ensure that the remote firewall allows traffic from the 10.0.0.0/16 range, as it will appear as the source after decryption.

Additionally, verify that no other firewall rules on the LAN or WAN interfaces are blocking the traffic before it reaches the NAT engine. Rules in pfSense are processed top-down, so ensure that allow rules for the remote subnet are positioned correctly relative to any deny-all policies.

Frequently Asked Questions

Can I use Proxy ARP to solve the subnet mapping issue?

No, Proxy ARP is not suitable for IPsec tunnel mapping and can cause significant network instability. It operates at Layer 2 and interferes with the encapsulation process required for secure tunnels. Always rely on Phase 2 definitions and NAT exclusions instead.

What happens if I forget to disable NAT for the remote subnet?

If NAT is not disabled, the source IP of the packets will be translated to your WAN IP. The remote site will receive traffic from an unexpected address, which may be blocked by their firewall or cause routing loops. This results in one-way communication or complete failure.

How do I handle multiple remote subnets behind one peer?

You must create separate Phase 2 proposals for each distinct subnet. Each proposal defines a specific destination range that should be encrypted. pfSense will evaluate these rules in order, sending traffic to the correct tunnel interface based on the destination IP.

Why is my IPsec tunnel up but I cannot ping the remote host?

This usually indicates a routing or firewall issue rather than a tunnel establishment problem. Check that the remote host has a route back to your 10.0.0.0/16 network and that no intermediate firewalls are dropping the decrypted packets. Also, verify that your pfSense NAT rules are correctly excluding this traffic.

Does this configuration affect other internet traffic?

No, provided you have correctly configured the NAT exclusion rule. Only traffic destined for the specific remote subnet will bypass NAT and go through the tunnel. All other internet-bound traffic will continue to use standard outbound NAT and the default WAN gateway.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More