<div><div><div>Hello dear community.</div><div>Unfortunately, I won't be able to reconfigure to IKEv2 as the entire infrastructure is configured to IKEv1.</div><div>Tried to set it up like this:</div><div> </div><div><div><em>conn fortinet</em></div><div><em>    authby=secret</em></div><div><em>    pfs=yes</em></div><div><em>    auto=start</em></div><div><em>    compress=yes</em></div><div><em>    rekey=yes</em></div><div><em>    left=%defaultroute</em></div><div><em>    leftid=@<left_id></em></div><div><em>    leftusername=<left_username></em></div><div><em>    leftxauthclient=yes</em></div><div><em>    leftmodecfgclient=yes</em></div><div><em>    right=<public_ip_fortinet></em></div><div><em>    rightid=<public_ip_fortinet></em></div><div><em>    rightxauthserver=yes</em></div><div><em>    rightmodecfgserver=yes</em></div><div><em>    cisco-unity=no</em></div><div><em>    modecfgpull=yes</em></div><div><em>    remote-peer-type=cisco</em></div><div><em>    ignore-peer-dns=yes</em></div><div><em>    send-vendorid=yes</em></div><div><em>    dpddelay=3</em></div><div><em>    dpdtimeout=60</em></div><div><em>    dpdaction=restart</em></div><div><em>    fragmentation=yes</em></div><div><em>    encapsulation=auto</em></div><div><em>    ikev2=no</em></div><div><em>    aggressive=yes</em></div><div><em>    ipsec-interface=0</em></div><div><em>    keyexchange=ike</em></div><div><em>    ike=aes256-sha2_256;dh14</em></div><div><em>    phase2=esp</em></div><div><em>    phase2alg=aes256-sha2_256;dh14</em></div><div><em>    salifetime=24h</em></div><div><em>    type=tunnel</em></div><div><em>conn fortinet_1</em></div><div><em>    also=fortinet</em></div><div><em>    leftsubnet=10.0.5.2/32</em></div><div><em>    rightsubnet=10.0.0.0/24</em></div><div><em>conn fortinet_2</em></div><div><em>    also=fortinet</em></div><div><em>    leftsubnet=10.0.5.2/32</em></div><div><em>    rightsubnet=10.0.1.0/24</em></div><div><em>conn fortinet_3</em></div><div><em>    also=fortinet</em></div><div><em>    leftsubnet=10.0.5.2/32</em></div><div><em>    rightsubnet=10.0.2.0/23</em></div><div><em>conn fortinet_4</em></div><div><em>    also=fortinet</em></div><div><em>    leftsubnet=10.0.5.2/32</em></div><div><em>    rightsubnet=10.0.4.0/24</em></div><div><em>conn fortinet_5</em></div><div><em>    also=fortinet</em></div><div><em>    leftsubnet=10.0.5.2/32</em></div><div><em>    rightsubnet=172.16.0.0/21</em></div><div> </div></div><div>With this configuration, it also failed to configure.</div><div>And with any configurations, I get a message in the logs:</div><div> </div><div><div><strong>tail -f /var/log/pluto.log  | grep "FAILED:"</strong></div><div><em>May  8 19:54:05.721213: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:54:38.017198: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:55:10.195420: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:55:42.539204: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:56:21.746061: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:56:53.951330: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:57:26.343813: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:57:58.810289: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:58:31.013801: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:59:03.226261: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 19:59:35.483016: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 20:00:07.743153: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div><em>May  8 20:00:40.004018: ABORT: ASSERTION FAILED: switch (ue->state.id.proto) case 108 (0x6c) unexpected (netlink_kernel_sa_expire() +2011 /programs/pluto/kernel_xfrm.c)</em></div><div> </div></div><div>I have Libreswan 4.11 installed. Compiled according to the instructions (deb package). OS Debian 11.</div></div><div> </div><div>08.05.2023, 00:36, "Paul Wouters" <paul@nohats.ca>:</div><blockquote><p>On Thu, 4 May 2023, Armen Dilanyan wrote:<br /> </p><blockquote> I am setting up IPSec between Fortinet and my linux machine using the IKEv1 protocol.<br /> I need to access networks 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/23, 10.0.4.0/24, 172.16.0.0/21 which are behind the Fortinet firewall.<br /> When I connect Forticlient everything works. When I connect from a Linux machine, I only have access to the 172.16.0.0/21 network.</blockquote><p><br />Your best bet is to copy the connection for each subnet, and add a<br />rightsubnet= statement to each of them to bring up separate tunnels<br />for each of your subnets.<br /><br />Note it is stronly recommended you switch to IKEv2, see RFC-9395<br /><br /><a href="https://datatracker.ietf.org/doc/html/rfc9395" rel="noopener noreferrer">https://datatracker.ietf.org/doc/html/rfc9395</a><br /><br />Paul</p></blockquote></div><div> </div><div>08.05.2023, 00:36, "Paul Wouters" <paul@nohats.ca>:</div><blockquote><p>On Thu, 4 May 2023, Armen Dilanyan wrote:<br /> </p><blockquote> I am setting up IPSec between Fortinet and my linux machine using the IKEv1 protocol.<br /> I need to access networks 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/23, 10.0.4.0/24, 172.16.0.0/21 which are behind the Fortinet firewall.<br /> When I connect Forticlient everything works. When I connect from a Linux machine, I only have access to the 172.16.0.0/21 network.</blockquote><p><br />Your best bet is to copy the connection for each subnet, and add a<br />rightsubnet= statement to each of them to bring up separate tunnels<br />for each of your subnets.<br /><br />Note it is stronly recommended you switch to IKEv2, see RFC-9395<br /><br /><a href="https://datatracker.ietf.org/doc/html/rfc9395" rel="noopener noreferrer">https://datatracker.ietf.org/doc/html/rfc9395</a><br /><br />Paul</p></blockquote>