| Description | This article explains an issue where application traffic failing even though there is Firewall policy in place. |
| Scope | FortiGate, FortiOS 6.x / 7.x, Firewall policy configuration, custom service objects. |
| Solution |
Symptoms:
Administrators may observe the following in the traffic logs:
Even though an allow policy exists for the source and destination addresses, the traffic continues to match the implicit deny rule.
Cause: This issue typically occurs when the application uses non-standard, dynamic, or vendor-specific ports that administrators may not be aware of.
As a result:
Identifying Unknown/Unlisted Ports:
Use the following methods to find the exact port required by the application:
diagnose sniffer packet any 'host <server_IP>' 4
Example: A third-party application uses TCP port 9005 for agent communication. Since this port was not included in any service group within the firewall rule, traffic failed and hit the implicit deny policy.
Solution:
Navigate to: Policy & Objects -> Services -> Create New.
Specify:
CLI example:
config firewall service custom
Navigate to: Policy & Objects -> Firewall Policy -> Edit Policy -> Services. Add the newly created service to the allowed services list.
CLI example:
config firewall policy
After updating the policy:
Verification:
Use the following methods to confirm the fix:
Conclusion: Traffic may be denied by the implicit deny rule when the application uses a port that is not included in any firewall policy. Creating the required custom service and adding it to the appropriate allow policy resolves the issue and ensures the traffic is correctly matched and permitted. |
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.