Skip to content

Newark, Delaware

Networking

Troubleshooting FortiGate NAT policies without guesswork

Confirm the expected path first Before making any changes or running diagnostics, document the intended traffic flow in detail. Write down the source IP range, destination IP or FQDN, the…

October 13, 20266 min readStarlink Nexus Network Practice
Troubleshooting FortiGate NAT policies without guesswork

Confirm the expected path first

Before making any changes or running diagnostics, document the intended traffic flow in detail. Write down the source IP range, destination IP or FQDN, the service or port involved, and the expected return route. This step is not just administrative. Many NAT issues stem from assumptions about these parameters that do not match the actual configuration or business requirement. For example, a user may believe their source object covers a subnet, but the object in the FortiGate policy only includes a single host. Or, the destination object may point to an outdated IP after a server migration.

To avoid these mismatches, compare the written path against both the policy list and the network diagram. From the server perspective, check which policies would match inbound connections. From the user or client side, verify outbound policies. Use the FortiGate policy hit counters or logs to confirm whether traffic is hitting the rule you expect. If the hit count does not increase during your test, the traffic is not matching the intended policy, and the NAT rule will not apply. Do not rely on memory or assumptions about the current configuration; always check the live policy list and the objects referenced.

A successful result is when your test traffic increases the hit counter on the correct policy, and the source and destination objects in the rule match your documented path. If the hit counter is static or increases on an unexpected rule, pause to review your path documentation and object definitions. Avoid making speculative changes to NAT rules without this clarity, as it often leads to further confusion and troubleshooting dead ends.

Follow both directions

NAT issues are rarely one-way. For every session, both the forward and reverse paths must be considered. Start by verifying the ingress address—the IP and interface where the packet enters the FortiGate. Then check the egress interface, which determines the outgoing path after NAT is applied. Review both source NAT (SNAT) and destination NAT (DNAT) settings. A common mistake is to fixate on only the outbound or inbound rule, missing the fact that a misconfigured reverse path can break the session.

Packet capture is invaluable here. Use the FortiGate's built-in sniffer to capture traffic before and after NAT. For example, capture on the ingress interface to see the original packet, then on the egress interface to see the translated packet. If the NAT is not applied as expected, or if the packet disappears between interfaces, you have direct evidence of where the process fails. Debug logs can help, but they often lack the clarity of seeing real packets in both directions.

After correcting a policy, clear or expire affected sessions using the session table. Stale sessions can persist with the old NAT mapping, leading to false negatives in your tests. Always test with the real application, not just ICMP ping. Many NAT issues do not affect ping but break TCP or UDP sessions due to port translation or state tracking differences. A successful test is when the application works as expected in both directions, and packet captures show correct NAT translation on both ingress and egress.

Use an explicit ticket queue for NAT changes

Any change to NAT policies should be tracked in a named ticket queue—such as "FW-NAT-Changes"—to ensure accountability and traceability. When troubleshooting, the temptation is often to make quick adjustments directly on the firewall, especially under pressure from users or management. This can lead to undocumented changes, conflicting edits, or forgotten test rules left active in production.

Before making any modification, create or update a ticket in the queue. Document the current policy, the intended change, and the reason for the adjustment. Attach relevant artefacts: screenshots of the policy list, packet captures, and a summary of the issue observed. This provides a clear audit trail and allows colleagues to review or roll back changes if needed.

Failure to use a ticket queue often results in confusion during later troubleshooting. For example, a NAT rule added during an outage may remain in place, causing unexpected behaviour weeks later. Or, multiple engineers may make overlapping changes, leading to policy conflicts. A well-managed queue ensures that every change is reviewed, tested, and either confirmed as successful or reverted if it introduces new issues. Good practice is to close the ticket only after end-to-end testing confirms the NAT issue is resolved and the change is documented.

Inspect VLAN and interface assignments

NAT policies are tightly coupled to interface and VLAN assignments. A common failure mode occurs when traffic is expected on one VLAN, but the policy references another. For example, a server may move from VLAN10 to VLAN20, but the NAT policy still points to the old interface. This results in traffic missing the intended rule entirely.

Begin by listing all interfaces and VLANs on the FortiGate. Confirm the source and destination interfaces in the NAT policy match the actual network topology. Use the interface status page to verify link state and assigned subnets. If a policy references a VLAN that is down or misconfigured, NAT will not function as intended.

Packet capture on both the expected and actual VLANs can reveal misrouted traffic. For instance, you may see packets arriving on VLAN20 but no matching policy, while the policy is set for VLAN10. Adjust the policy to reference the correct interface, and retest. Avoid making interface changes without confirming the impact on existing NAT rules. Document any interface or VLAN changes in the same ticket queue as NAT policy changes, as these are often interdependent.

A successful outcome is when the NAT policy aligns with the live interface assignments, and packet captures show traffic flowing as intended. Do not assume VLAN assignments are static; always verify before and after making NAT adjustments.

Export and review the current config

Before making any changes to NAT rules, export the current FortiGate configuration. This provides a baseline for comparison and a rollback point if troubleshooting introduces new issues. Use the built-in config export function to generate a backup file, and store it in a secure location with a timestamp and ticket reference.

Review the exported config for all NAT-related settings: firewall policies, address objects, VIPs, IP pools, and routing entries. Look for duplicate or overlapping rules, which can cause traffic to match an unintended policy. For example, two NAT rules may both apply to the same source subnet, but with different translations. The order of these rules in the config determines which one is used, and a recent change may have altered this order.

A specific failure mode occurs when a new NAT policy is added above an existing rule, unintentionally overriding it. Reviewing the config export allows you to spot such changes before they impact production traffic. If troubleshooting requires multiple changes, take additional exports after each step. This allows for a stepwise rollback if a particular change causes a regression. Never rely solely on the GUI or CLI for change tracking; always maintain an external backup of the configuration.

A good result is when you can compare the config before and after changes, identify exactly what was modified, and restore the previous state if needed. Avoid making multiple changes without intermediate exports, as this makes troubleshooting and rollback much more difficult.

Monitor with NAT-specific alert thresholds

Effective monitoring is essential for proactive NAT troubleshooting. Configure alert thresholds for NAT-related metrics, such as session table utilisation, dropped packets due to NAT exhaustion, and failed NAT translations. Use the FortiGate's built-in alerting or integrate with your central monitoring system to receive notifications when thresholds are breached.

A specific artefact to configure is an alert for high session table usage. If the session table approaches its limit, new connections may fail to establish NAT mappings, resulting in intermittent connectivity issues. Another useful alert is for VIP translation failures, which can indicate misconfigured destination NAT rules. Monitor logs for repeated NAT errors or policy mismatches, and set thresholds that trigger investigation before users report problems.

One failure mode is silent NAT exhaustion, where the firewall stops creating new NAT sessions without generating obvious errors. By the time users notice, the issue may have persisted for hours. With alert thresholds in place, you can respond to early warnings and prevent widespread outages. After tuning alerts, test them by artificially generating NAT traffic to confirm notifications are received. Avoid setting thresholds too high or low; calibrate them based on normal usage patterns for your environment.

A successful monitoring setup is when alerts provide actionable information, allowing you to address NAT issues before they impact users. Do not rely on manual log reviews alone, as these often miss intermittent or low-volume failures.

Schedule NAT changes within a defined change window

All NAT policy changes should be scheduled within a defined change window, documented in your ITSM or change management tool. This minimises the risk of disruption during business hours and ensures that stakeholders are aware of potential impact. A typical artefact is a change window entry specifying the start and end time, affected services, and rollback plan.

Before the window begins, notify users and stakeholders of the planned change. Prepare a detailed plan, including the exact NAT rules to be modified, the expected outcome, and the verification steps. During the window, make changes one at a time, testing after each adjustment. If unexpected issues arise, use the config export to revert to the previous state.

A common failure mode is making NAT changes outside of a change window, leading to unplanned outages or incomplete testing. For example, a late-night change may break VPN access, but no one is available to troubleshoot until the next day. By using a scheduled window, you ensure that resources are available to address any issues immediately.

A good practice is to document the outcome of the change in the ticket queue, noting whether the change succeeded, required rollback, or introduced new issues. Do not make ad-hoc NAT changes without a scheduled window, as this undermines both troubleshooting and operational stability.

Identify and clear persistent session failures

After making NAT policy corrections, persistent session failures can still occur. These failures often present as intermittent connectivity, where some users or applications continue to experience issues despite the policy appearing correct. The underlying cause is usually stale or corrupted session entries in the FortiGate session table.

To address this, use the FortiGate CLI to list active sessions for the affected source and destination. Look for sessions that are stuck in a half-open state or have unusual timeouts. Clear these sessions using the appropriate CLI command, such as diagnose sys session clear, targeting only the relevant traffic to avoid disrupting unrelated connections.

A specific symptom is when new connections work, but existing sessions continue to fail until they time out naturally. By proactively clearing affected sessions, you ensure that all traffic uses the updated NAT mapping. Avoid clearing the entire session table unless absolutely necessary, as this can disrupt all users.

A successful outcome is when application connectivity is restored for all users, and new sessions establish correctly with the updated NAT policy. Monitor for recurring session failures, which may indicate an underlying issue with the policy or network topology that requires further investigation.

Topics

#Networking

Starlink Nexus Networking practice

If this reflects a problem you are dealing with, we can review your environment and tell you what we would change first - including if the answer is nothing.

Start a conversation

Next step

Let's scope it properly.

A 30-minute call is usually enough to tell whether we are the right fit. No pitch deck, no pressure.