Reset vpn ipsec command is getting stuck or taking too long to come out. I can not use restart vpn as there is multiple tunnel in vyos. Mostly this happens when peer is not reachable. I am seeing following logs in charon
Feb 19 06:54:46 15[CFG] received stroke: terminate ‘peer-10.15.20.69-tunnel-vti’
Feb 19 06:54:46 05[IKE] <peer-10.15.20.69-tunnel-vti|1> destroying IKE_SA in state CONNECTING without notification
Feb 19 06:54:46 06[CFG] received stroke: initiate ‘peer-10.15.20.69-tunnel-vti’
Feb 19 06:54:46 08[IKE] <peer-10.15.20.69-tunnel-vti|2> initiating Main Mode IKE_SA peer-10.15.20.69-tunnel-vti[2] to 10.15.20.69
Feb 19 06:54:46 08[ENC] <peer-10.15.20.69-tunnel-vti|2> generating ID_PROT request 0 [ SA V V V V V ]
Feb 19 06:54:46 08[NET] <peer-10.15.20.69-tunnel-vti|2> sending packet: from 192.168.50.223[500] to 10.15.20.69[500] (344 bytes)
Feb 19 06:54:50 10[IKE] <peer-10.15.20.69-tunnel-vti|2> sending retransmit 1 of request message ID 0, seq 1
Feb 19 06:54:50 10[NET] <peer-10.15.20.69-tunnel-vti|2> sending packet: from 192.168.50.223[500] to 10.15.20.69[500] (344 bytes)
Feb 19 06:54:58 09[IKE] <peer-10.15.20.69-tunnel-vti|2> sending retransmit 2 of request message ID 0, seq 1
Feb 19 06:54:58 09[NET] <peer-10.15.20.69-tunnel-vti|2> sending packet: from 192.168.50.223[500] to 10.15.20.69[500] (344 bytes)
Feb 19 06:55:11 12[IKE] <peer-10.15.20.69-tunnel-vti|2> sending retransmit 3 of request message ID 0, seq 1
Feb 19 06:55:11 12[NET] <peer-10.15.20.69-tunnel-vti|2> sending packet: from 192.168.50.223[500] to 10.15.20.69[500] (344 bytes)
Feb 19 06:55:34 13[IKE] <peer-10.15.20.69-tunnel-vti|2> sending retransmit 4 of request message ID 0, seq 1
Feb 19 06:55:34 13[NET] <peer-10.15.20.69-tunnel-vti|2> sending packet: from 192.168.50.223[500] to 10.15.20.69[500] (344 bytes)
Vyos Version: 1.7
Following is the ipsec config of one side. Other side is also configured with same config and tunnel is working fine. The issue comes when one side is not reachable and we try to reset vpn with 'reset vpn ipsec-peer ’ command. Since other side is not reachable vyos tries to re transmit info messages to other side for multiple times and all this time command gets stuck. Ideally reset command should exit and re transmition should happen internally.
I’d recommend migrating to a newer release of VyOS as that one is EOL, as is 1.1.8. I’d recommend building a new 1.2.0 image, or at a minimum 1.1.8 and if possible, could you try to implement IKEv2 for this specific tunnel?
Tired above options already. Tunnel and traffic is stable for days that is not the issue But I have different requirement where connectivity between two vpn gw goes down for some time. I wrote one task scheduler which reset ipsec when connection is down. But when there is no connection between two vpn gw and I do reset vpn that command take too much time to exit and deny my script to run further. When I do reset vpn manually same thing happens. Already provided charon log in my post.