Description | This article describes how to troubleshoot IPsec VPN tunnel errors due to traffic not matching selectors. |
Scope |
|
Solution |
The customer may complain about increasing errors appearing on the IPsec VPN interface.
# fnsysctl ifconfig <Phase 1 name>
Counters which are marked as red need to be observed.
Txe error count can be caused by the following reasons:
- Attempting to send traffic when no IPsec SA has not been negotiated. - Attempting to send traffic when there is no route to the gateway IP. - Attempting to send traffic on an IPsec SA that is dead/expired. - No memory available to add the IPsec header onto the egress packet.
The txe error can also count up if there are phase 2 selectors, and then try to ping a destination not allowed by the selector. The txe error count will then increment by one for every ping.
First, confirm if errors are incrementing due to traffic directed towards tunnel interface while it's not included under phase2 selectors.
- Run diag debug flow with respective filters. - Generate traffic - Filter for interesting traffic - Search the output for the below message msg="No matching IPsec selector, drop".
The following shows the packet debug flow for the traffic trying to pass through the VPN tunnel-HKBNSOC. However, it is possible to see the traffic failing.
2021-11-03 11:22:42 id=20085 trace_id=2502 func=print_pkt_detail line=5693 msg="vd-root:0 received a packet(proto=17, 103.228.181.139:19212->10.28.10.81:514) from local. "
In this case, however, the destination IP is included in selectors, the traffic going out is using source IP 103.228.181.139 (WAN interface IP) which is not included under phase 2 selectors.
# show vpn ipsec phase2-interface HKBNSOC # edit "HKBNSOC" set phase1name "HKBNSOC" set src-subnet 192.168.0.0 255.255.255.0 set dst-subnet 10.28.10.80 255.255.255.240 next # end
After checking the destination IP and destination port, it seems to be the traffic for the Syslog is trying to leave the tunnel but not able to pass through the tunnel as the IP should be the part of the phase 2 selector to pass through the tunnel. Therefore for this example change the source-ip to be one included in the src-subnet (LAN interface IP in our case).
# config log syslogd setting set status enable set source-ip 192.168.0.1 end
For reference changing source IP of Syslog please check this link: select this link.
Else, drops could be due to large size packets.
|
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 2024 Fortinet, Inc. All Rights Reserved.