Hello,
i have a problem with ipsec connections when I want to use more than one network remotely with the same local network phase 2.
1. network
local remote
192.168.100.0/24 10.0.0.0/24
works until add a second network
2. network
local remote
192.168.100.0/24 10.10.0.0/24
I got a 'received DELETE for ESP CHILD_SA' and then a 'closing CHILD_SA con' .
Regards,
atom
What's the other side running? Do you have "Tunnel isolation" enabled? Most commercial firewalls/vpn-gateways require that in my experience.
And of course you need to add both networks to the "local" list on the remote side.
The remote side is running a Cisco ASA. I've also tried to set "Tunnel isolation".
The tunnel works before without any issue between a Lancom and the Cisco. Now I try only to switch one end of the tunnel from Lancom to OPNsense.
So you have two phase 2 SAs on the ASA side, too? Then this should work as intended. Probably with Tunnel isolation enabled.
Are you sure it is not only temporarily tearing down the tunnel because of your config changes?
We first try it with IKEv2. Then I could reach one of the other two networks, depending on "Tunnel isolation" is enabled or not.
Then we fall back to IKEv1. Then it was not possible to get the tunnel running with two networks enabled.
The SAs are correct (on both side of the tunnel):
Source Destination Protocol SPI Enc. alg. Auth. alg. Data
xx.xx.xx.xx yy.yy.yy.yy ESP c9fd5d36 rijndael-cbc hmac-sha1 0 B
yy.yy.yy.yy xx.xx.xx.xx ESP c47ae68a rijndael-cbc hmac-sha1 0 B
xx.xx.xx.xx yy.yy.yy.yy ESP 161bc2a1 rijndael-cbc hmac-sha1 18176 B
yy.yy.yy.yy xx.xx.xx.xx ESP c9458776 rijndael-cbc hmac-sha1 6695 B
The packets for the first network are send with the correct SPI:
14:14:19.072273 (authentic,confidential): SPI 0x161bc2a1: IP 192.168.x.x.53355 > 10.0.x.x.3210: Flags [S], seq 421378147, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
14:14:19.073146 (authentic,confidential): SPI 0xc9458776: IP 10.0.x.x.3210 > 192.168.x.x.54727: Flags [S.], seq 1604342582, ack 421378148, win 8192, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
But the packets for the second network are send with the same SPI and not the other one:
14:14:40.298621 (authentic,confidential): SPI 0x161bc2a1: IP 192.168.x.x.53356 > 172.16.x.x.53200: Flags [S], seq 2338379155, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0
14:14:40.537097 (authentic,confidential): SPI 0x161bc2a1: IP 192.168.x.x.53357 > 172.16.x.x.53200: Flags [S], seq 3742114150, win 64860, options [mss 1380,nop,wscale 8,nop,nop,sackOK], length 0