Created on
09-16-2024
10:56 AM
Edited on
03-19-2025
05:30 AM
By
Stephen_G
| Description | This article describes the commands needed to initially determine why port forwarding config is not working. |
| Scope | FortiGate. |
| Solution |
diag sniffer packet any 'host <public IP address of source> and port <port number>
Example: If the source IP address is w.x.y.z (in this example, it is the source public IP address) and the port is 80:
diag sniffer packet any 'host w.x.y.z and port 80' 4
The output should show if the packet reached FortiGate. In this case, there should be an inbound SYN packet(s) from the source IP address.
diagnose debug reset diagnose debug disable diagnose debug flow filter clear diagnose debug console timestamp enable diagnose debug flow show function-name enable diagnose debug flow filter addr <source public IP address> diagnose debug flow trace start 99 diagnose debug enable
To disable the flow once it is no longer needed:
diagnose debug disable diagnose debug reset
The output of debug flow should provide more details. For instance, a denied traffic due to implicit policy 0 means that either there is no corresponding firewall policy or misconfigured firewall policy (wrong interface(s), service(s)). In some cases, it was due to overlapping subnet. For instance, if LAN IP address is 192.168.200.200 and SSL VPN IP address range includes 192.168.200.200. In this scenario, then packets are going to be sent towards the ssl.<vdom> name instead of the LAN.
Create a new ticket at support.fortinet.com and attach the collected sniffer and debug flow output if further assistance is needed to examine the output of debug flow. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.