| Description | This article explains interface selection logs in the debug flow and the 'send to ips' logs received in debug output. |
| Scope | FortiGate. |
| Solution |
When FortiGate receives a packet, it performs a routing lookup on the first packet from the source and on the first reply packet. To understand the routing process, see Technical Tip: FortiGate Route-Lookup Process
Example:
Below is an output of a TCP Session in the original direction:
FGT # id=65308 trace_id=571 func=print_pkt_detail line=5942 msg="vd-root:0 received a packet(proto=6, 192.168.20.2:63611->63.137.229.1:443) tun_id=0.0.0.0 from port6. flag [S], seq 3839416144, ack 0, win 64240" id=65308 trace_id=571 func=__ip_session_run_tuple line=3474 msg="SNAT 192.168.20.2->10.9.10.51:63611"
The packet above is a TCP SYN packet which can be identified with the flag [S]. Since it is the first packet for this stream, FortiGate performed a route lookup and identified that the packet should be routed via port1. A session table entry has been created, which can be verified using the commands mentioned in the article Session Table Information. After SNAT is complete on this session a 'send to ips' log is received.
If one or more UTM profiles are enabled in the policy, the log 'send to ips' will be displayed and it will indicate that UTM inspection is being performed.
Reply Direction:
id=65308 trace_id=574 func=print_pkt_detail line=5942 msg="vd-root:0 received a packet(proto=6, 63.137.229.1:443->10.9.10.51:63611) tun_id=0.0.0.0 from port1. flag [S.], seq 107956612, ack 3839416145, win 65535"
Flag [S.] indicate the TCP SYN ACK packet. Since this is the first reply packet FortiGate also performed a route lookup for this to get the outgoing interface and also found an existing session.
Subsequent Packets :
id=65308 trace_id=576 func=print_pkt_detail line=5942 msg="vd-root:0 received a packet(proto=6, 192.168.20.2:63611->63.137.229.1:443) tun_id=0.0.0.0 from port6. flag [.], seq 3839416145, ack 107956613, win 1026"
id=65308 trace_id=585 func=print_pkt_detail line=5942 msg="vd-root:0 received a packet(proto=6, 63.137.229.1:443->10.9.10.51:63611) tun_id=0.0.0.0 from port1. flag [.], seq 107956613, ack 3839417971, win 2231"
Once the TCP handshake is complete, subsequent packets within the same TCP flow do not need to undergo repeated parameter checks unless there are changes in routing, SNAT, DNAT, address, or policy etc.
Related document: |
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.