Routing and NAT for IPsec tunnels
Routing and Network Address Translation (NAT) configurations for site‑to‑site IPsec VPNs depend on the tunnel type and the traffic you want to send through the tunnels.
Learn about the automatically created routes and the routing and NAT settings you can configure on the web admin console and the CLI.
Routing
NAT rules don't change the firewall's routing decision. The firewall needs a route to the destination.
One of the following configurations is needed to route traffic:
- VPN routes: The firewall automatically creates these routes at the backend for policy-based IPsec connections.
- Static, SD-WAN, and dynamic routes.
- The
ipsec_routecommand on the CLI for forwarded traffic. System-generated traffic doesn't require this command.
The routing precedence set on the CLI determines the type of route the firewall tries to match first. See Routing.
NAT
Learn about the routing and NAT requirements for site-to-site IPsec VPNs.
NAT configurations for IPsec VPNs
You can configure NAT using one of the following configurations:
- IPsec connections: These include NAT settings.
- NAT rules.
- The
sys-traffic-natcommand on the CLI: Use it for system-generated traffic. It's the traffic generated by the firewall itself, such as authentication and DHCP.
Use cases
Route-based VPN (any to any subnets) | Policy-based VPN | |
|---|---|---|
| Traffic to a host through existing IPsec tunnel |
|
|
| System-generated traffic: Authentication |
| sys-traffic-nat command.See Route authentication queries. |
| System-generated traffic: DHCP relay | Currently, the firewall doesn't send DHCP relay information through route-based VPNs. | sys-traffic-nat commandSee HO firewall as DHCP server and BO firewall as relay agent.See Send DHCP traffic over policy-based IPsec VPN to servers. |
| Same subnets on the local and remote firewalls |
|
|
Source translation for policy-based IPsec VPNs
Policy-based IPsec VPN traffic usually doesn't require source translation. However, if you need to translate this traffic, make sure the matching SNAT rule has Outbound interface set to Any. The firewall then translates the source to the Translated source specified in the SNAT rule.
This behavior applies even when you select Override source translation (SNAT) for specific outbound interfaces.
Note
When you set the Outbound interface to specific WAN ports instead of Any, the firewall doesn't apply the SNAT rule to policy-based IPsec VPN traffic. For example, the default SNAT rule's Outbound interface is automatically set to the firewall's WAN ports, so the rule doesn't apply to policy-based IPsec VPN traffic.