Description | This article describes how to configure FortiGate to send TCP RST or ICMP6 'unreachable prohibited' for a blocked traffic. |
Scope | FortiOS 7.2, 7.4, 7.6 |
Solution |
By default FortiOS does not send TCP RST for blocked traffic (IPv4 and IPv6). There are settings (policy and system settings) which can be adjusted, so FortiGate can send RST to the client or ICMP6 'unreachable prohibited'.
Topology:
FortiGate port2 and port4 interface configuration:
edit "port2"
edit "port4"
Firewall rule which blocks the traffic from IPv6 2a00:9480:10:1::1:2 towards destination IPv6 2a00:9480:11:1::1:2:
config firewall policy
By default when traffic from 2a00:9480:10:1::1:2 for destination 2a00:9480:11:1::1:2 is received, because of the policy No1, FortiOS will block(action deny) that traffic without sending any packet to the client. Output from diagnose sniffer:
diagnose sniffer packet any " host 2a00:9480:10:1::1:2" 4
If the policy No1 has the 'set send-deny-packet enable' , FortiOS will start to send RST packets:
diagnose sniffer packet any " host 2a00:9480:10:1::1:2" 4
The client receives the message 'telnet: Unable to connect to remote host: Connection refused' . The source IPv6 for the RST packet is the IPv6 address of the server. ForitOS provides a mechanism to change the source IPv6 address and instead of 2a00:9480:11:1::1:2 FortiOS can respond with the IPv6 address assigned to port2 . Instead RST packet, FortiGate will send an ICMP6 'unreachable prohibited' When the configuration bellow is in place :
config system settings
And:
config firewall policy edit 1 set name "policyipv6" set uuid c9bb478e-3a14-51f0-04ea-ce5e10a20495 set srcintf "port2" set dstintf "port4" set srcaddr6 "all" set dstaddr6 "all" set schedule "always" set service "ALL_ICMP6" "ALL_TCP" "ALL_UDP" set logtraffic disable set send-deny-packet enable <----- Disabled by default. next
Output from sniffer:
diagnose sniffer packet any " host 2a00:9480:10:1::1:2" 4
Summary: Without 'set send-deny-packet enable' and 'deny-tcp-with-icmp enable', FortiGate will not send any 'RST/ICMP unreachable' packet to the client. With only 'set send-deny-packet enable' , FortiGate will send RST packets to the client. With 'set send-deny-packet enable' and 'deny-tcp-with-icmp enable', FortiGate will send 'ICMP6 unreachable prohibited' to the client. |
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.