-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipsec: reqid left/right mismatch in route-based phase 1 #3443
Comments
|
Are both sides 19.1.6 and cleanly rebooted? Do IPsec configs differ on both sides? I mean in terms of phase 1 and 2 not configured on the other side... |
|
Both sides are 19.1.6. Policy based IPSec is working normal. I did also a try to modify the working policy base configuration to avoid any typos. |
|
Site Y: Site X: |
|
You should be able to work around this by editing /conf/config.xml changing all on the left side to of that ikeid is still free. Can't offer a quick fix. @AdSchellevis will look at this next week, maybe reqid base needs to be able to be editable in phase 1. Cheers, |
|
site A site B You might have another configuration issue, I can't tell from the ticket. |
|
Exactly the same problem here, running 19.1.8 on both boxes, policy-based tunnels works fine, but route-based tunnels not come up. If the tunnel is established manually, traffic goes through the tunnel. charon: 12[KNL] received an SADB_ACQUIRE |
|
@vitense have you tried the exact same settings as described in the docs (https://docs.opnsense.org/manual/how-tos/ipsec-s2s-route.html)? We tested it on multiple machines, as far as we know its configuration related (support tag on the issue), strongswan messages are sometimes hard to interpret. |
|
I used the doc from github https://github.com/opnsense/docs/blob/master/source/manual/how-tos/ipsec-s2s-route.rst, it seems to be the same. I use certs for auth an other DH groups, and these settings in policy-based mode works...i'll check again with PSK. |
|
it's exactly the same behavior: tunnel is not coming up automatically, the messages are also the the same. |
|
You could post screenshots of the settings, maybe someone has an idea, I can't reproduce this on our end myself. |
|
@AdSchellevis oh, i forgot to mention: if the tunnel is established manually, the traffic is routed through. Also if i set one peer to "start immidiate" the tunnel is also up after ipsec restarted. So I think, that it could not be just an config issue. |
|
it might be an issue with "start on traffic" and vti, I haven't seen it on our end, but it might not be the best default for this setup anyway. If the device exist on OPNsense (ipsecXXX and have the right reqid assigned) it should work when there's an established connection. |
|
Yes, it's not the best option. Just to be sure: one box has reqid=1000, the other reqid=20000, but you wrote this doesn't matter? |
|
No, doesn't matter |
|
@vitense ok, that's a bit weird. when set to default it should be treated as "start immediate" in these cases: core/src/etc/inc/plugins.inc.d/ipsec.inc Lines 1168 to 1170 in 6cd8297
can you check your ipsec.conf if "auto" is set to "start"? if so, can you post the configs using "start immidiate" and default? they should be equal, but maybe we overlooked something. the reqid's shouldn't matter as this is just the local binding. |
|
Hi, here are the configs (seems to be identical): This file is automatically generated. Do not editconfig setup conn con1 dpdaction = none leftid = gw1 include ipsec.opnsense.d/*.confdefault: This file is automatically generated. Do not editconfig setup conn con1 dpdaction = none leftid = gw1 include ipsec.opnsense.d/*.confauto=start is set if "do not install automatically install routes" at IPSec Advances Settings". |
|
yes, you need "do not install automatically install routes" for routed, seems like a configuration issue then. See also https://wiki.strongswan.org/projects/strongswan/wiki/RouteBasedVPN
|
|
So a mixed mode IPSec config isn't possible? At the other box we also still use policy-based connections. |
|
I'm not sure it can't work, but the strongswan docs suggests it's not intended. |
|
i changed P1 from "default" to "start on traffic" and in ipsec.conf auto is set to "route". In strongswan.conf: install_routes = no |
|
I'm not sure I'm following now, if you choose "start on traffic" the config sticks to "auto = route", that would be odd core/src/etc/inc/plugins.inc.d/ipsec.inc Lines 1164 to 1165 in 6cd8297
|
|
every time i change something in P1 or P1 settings, auto is set to "route" in ipsec.conf. |
|
sorry, my community support time is spend for now. With "start on traffic" I meant "Start immediate", which should just set "auto = start" for this tunnel. |
|
if I set P1 to default -> auto = start |
|
if auto is set to "start", the tunnel is established when IPSec/strongswan starts. But if the tunnel is disconnected manually or due timeout, it is not reconnected by traffic, still the same messages: [KNL] received an SADB_ACQUIRE with policy id 2 but no matching policy found |
|
Try manual routes and "do not install automatically install routes", https://wiki.strongswan.org/projects/strongswan/wiki/RouteBasedVPN really suggests your settings aren't supported. |
|
automatically route installation was already disabled (please see my comment yesterday). |
|
I don't think I can help you, when in ipsec.conf |
|
thank you anyway |
|
The last hint was the solution! With "Do not install routes automatically" the tunnel is coming up and works! |
|
Sidenote: I have a customer with a VPN problem, IKEv1, running 15 tunnels in sum, 1 of it has problems with exact error. But it's legacy policy routing, not routed ipsec: EDIT: other side is Checkpoint |

[X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[X] I have searched the existing issues and I'm convinced that mine is new.
Describe the bug
IPSEC tunnel is not coming up in route-based configuration.
I have used the wiki: https://wiki.opnsense.org/manual/how-tos/ipsec-s2s-route.html
I think the problem is in mismatching reqids between the two sides.
Expected behavior
Tunnel should come up.
Relevant log files
Apr 25 10:52:55 | charon: 09[CFG] trap not found, unable to acquire reqid 0
Apr 25 10:52:55 | charon: 09[KNL] creating acquire job for policy XXX.XXX.XXX.XXX/32 === YYY.YYY.YYY.YYY/32 with reqid {0}
Apr 25 10:52:55 | charon: 09[KNL] received an SADB_ACQUIRE with policy id 52 but no matching policy found
Apr 25 10:52:43 | charon: 13[CFG] trap not found, unable to acquire reqid 0
Apr 25 10:52:43 | charon: 13[KNL] creating acquire job for policy XXX.XXX.XXX.XXX/32 === YYY.YYY.YYY.YYY/32 with reqid {0}
Apr 25 10:52:43 | charon: 13[KNL] received an SADB_ACQUIRE with policy id 52 but no matching policy found
Additional context
Add any other context about the problem here.
Environment
OPNsense 19.1.6-amd64
FreeBSD 11.2-RELEASE-p9-HBSD
OpenSSL 1.0.2r 26 Feb 2019
The text was updated successfully, but these errors were encountered: