The LAN 1:1 NAT feature in flexiWAN facilitates Source and Destination Network Address Translation (SDNAT) specifically tailored for local area network (LAN) interfaces. LAN NAT is a type of NAT in which both the source or destination IP addresses of a packet are changed as it traverses a network. This can be used to rewrite the destination address of incoming packets to direct them to the correct internal device, while simultaneously rewriting the source address to ensure that reply packets are sent back to the correct external device.

Getting started

LAN NAT, or Local Area Network Network Address Translation, is a specific implementation of SDNAT (Source and Destination Network Address Translation) that works exclusively on LAN-based network interfaces. It modifies both the source and destination IP addresses of packets as they traverse through a network, ensuring optimal routing and delivery of data within a LAN environment. By changing both the source and destination addresses, LAN NAT allows for improved flexibility and control in managing internal network traffic, providing an efficient means of routing data packets within a local area network. LAN NAT allows to use the same LAN subnet across devices while using unique NATted address.


To configure LAN NAT, navigate to device settings and from the Configuration tab click on Firewall & NAT. From there click on + sign under LAN NAT.


LAN NAT configuration window will open, see below for details of each section.


The window shows two sections, source and destination.


  • Match IP/Mask - used to mark source IP, from where the traffic is originating.

  • Action IP/Mask - once configured, source Match IP will be translated to Action IP.

  • LAN Interface - select interface for this specific rule. Used in case there are multiple LAN interfaces.


  • Match IP/Mask - used for setting remote / destination IP which source network / client is accessing.

  • Action IP/Mask - actual IP to which the traffic from Match IP translates.

Depending on the use case, configuration of both sections is not obligatory always. In order to understand how LAN NAT feaute is used, two use cases are prepared below:

  1. Rewriting destination IP address

  2. Communication between overlapping LAN range

Use cases

The following use cases are tested and supported by flexiWAN, however many other use cases are possible.

Rewriting destination IP

In a network configuration comprising multiple branch offices (spokes) connected to a central hub, each spoke utilizes an identical LAN IP range of The hub operates on a distinct LAN IP range of, hosting a main server with the actual IP address of Spoke LAN clients / devices are configured to communicate with this server via a designated virtual IP address of This IP cannot be changed and is hardcoded at the clients, which is common use case in industrial devices, ATMs etc.

For this use case, two devices are prepared with the following networking configuration:

  • Ottawa - Spoke - LAN range

  • Madrid - Hub - LAN range

  • Madrid - Server - LAN IP

  • Hardcoded server IP at Ottawa LAN clients -

The LAN NAT feature on flexiWAN addresses the challenge of this uniform IP schema across the branches. It allows network administrators to implement rules that match the source IP from the spoke clients with the pre-configured destination IP and seamlessly redirect this traffic to the main server’s actual IP address at the hub. This scenario exemplifies how LAN NAT facilitates communications between similarly addressed LANs across a hub-and-spoke topology without the need for reconfiguration at each endpoint.

To configure this use case, navigate to the Devices page. In this example, Ottawa is spoke site while Madrid is spoke. Click on the Ottawa edge.


From the interfaces page, observe LAN IP and its range of


Navigate to Configuration > Firewall & NAT. Click on the + sign under LAN NAT rules to add a new rule.


In the following section, configure the IP’s as in screenshot to match the source IP from the spoke clients with destination IP and redirect its traffic to the main server’s actual IP address at the hub, which is in this case See below screenshot for more details.


The screenshot above shows the following:

  • LAN Interface: Make sure to select LAN

  • Source - Match IP/Mask: from where traffic will be originating,

  • Source - Action IP/Mask: IP range from which the remote hub end will see traffic arriving from,

  • Destination - Match IP/Mask: IP which LAN clients have hardcoded to access resources from,

  • Destination - Action IP/Mask: Actual IP to which the matched IP will be translated to,

Confirm everything is correctly configured.


Now its time to test the configuration. From the LAN client, attempt to access the remote server resource using its IP As screenshot shows, remote IP is responding.


On the other end, running tcpdump on LAN client of IP confirms traffic from spoke is arriving and from its IP This IP range was set in the LAN NAT rule configuration.


Communication between overlapping LAN ranges

In this scenario, multiple flexiEdge locations are established in a full mesh topology, each with LANs configured identically using the IP range of Given that flexiWAN employs OSPF for network routes propagation between sites, direct communication between LAN clients with duplicate IP ranges is not possible out-of-the-box. This use case demonstrates how the LAN NAT feature resolves this challenge by enabling configurations that facilitate inter-site communication, despite the identical LAN configurations. Through LAN NAT, source traffic from these overlapping networks is selectively matched and rerouted to a unique range, ensuring seamless connectivity across the meshed network.

For this use case, two devices are prepared with the following networking configuration:

  • Ottawa - LAN IP

  • Madrid - LAN IP

  • Both devices have DHCP server enabled serving IP’s from the set LAN range.

  • LAN client is connected at each end. Both LAN clients have an IP

The aim is to establish communication across multiple sites with identical LAN IP ranges, including cases where the same LAN client IP addresses are in use. To achive this, each site will configure transit IP range

  • Ottawa -

  • Madrid -

For this configuration, proceed to the Devices page, select the settings for the Ottawa device. From the Configuration tab, access Firewall & NAT and hit the plus (+) icon in the LAN NAT section. As seen in the screenshot below, the ‘Match IP’ is set as and the ‘Action IP’ as, indicating that outgoing traffic from the network will be converted to the network.


After setting up LAN NAT on the initial device, it’s crucial to carry out the same steps for the corresponding device at the other location, here referred to as the Madrid device. Go to its Firewall & NAT settings and establish a new LAN NAT rule. In the provided screenshot, the source ‘Match’ is again, similar to the first device. However, the ‘Action IP’ differs; on the Madrid device, it’s assigned to the network.


Once both edges are configured, its time to test the configured rules. The following points are important to note:

  • The action IP’s on both edges will be used for inter-edge communication, instead of their actual IP’s from range.

  • LAN client from Ottawa edge has an IP of, so LAN client from Madrid site must use to reach it.

  • LAN client from Madrid edge has an IP of, so LAN client from Ottawa edge must use to reach it.

To test the configuration, the following screenshot shows a ping response of Madrid LAN client. Ottawa LAN client is pinging which is then translated to remote IP of


tcpdump output on Madrid LAN client confirms traffic received from action IP of Ottawa LAN client