-
Notifications
You must be signed in to change notification settings - Fork 757
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
Static route to route-based IPsec gateway does not get configured after reboot #3414
Comments
|
So 9046727 should work for tunnels on static IPs... but it needs more work unfortunately. You can try it and let us know: Cheers, |
|
@fichtner Works for us in 19.1.4 Thanks for the quick fix. |
|
Thanks, I'll bring this workaround into 19.1.7 and will work on a better solution for 19.7. |
|
Apparently, this issue is a burden to 19.7.4_1 in continuity. This is rather unfortunate as it makes more flexible VTI difficult and not as reliable as hoped. Please be aware this may hinder deployment aims and seems to contradict the OPNsense own advertisement "to run dynamic routing protocols over the tunnel to create more redundant, or software-defined networks." |
|
Only to clarify, dynamic routing is NOT affected by this issue, as these routes are learned dynamically by FRR and not configured via OPN itself, so the "advertisement" is still true :) |
IMHO this may be technically correct but is quite misleading. Obviously, there is a lack of reliability to VTI and one cannot hope to ge a "more redundant" network. Dynamic routing works (after some efforts and configuration) but apparently a VTI route fails after any reboot. The tunnel is up but routing and traffic is failing. |
|
P.S.: my lab survived the reboot, no iusse with route-based ipsec and reboot. |
My findings are different. In a three peer scenario both VTI channels fail repeatedly after reboot. As a workaround we use a two hop IPsec standard tunnel, re-apply the route configuration, and only then the VTI comes up again. |
|
Screenshots please, for you it's clear what a "three peer scenario" and a "two hop IPsec standard tunnel" means. I'd recommend you open a new issue with as much information as possible and screenshot of P1 and P2, error logs from system log and ipsec.log. |
Point taken. However, the core issue seems to be the same and IPSec.logs are quite exhaustive. |
|
I‘m waiting for users to help solve this by providing more test cases, not to hear how frustrating it is. The ticket is open and the issue is obvious. 😊 |
|
How can I support? I have the same problem. I am use a VPN to Azure with static route. I have to press the "Apply"-Button (System -> Routes) after every reboot. |
Same here in the a.m. scenario but without Azure. OPNsense 19.7.4_1-amd64, LibreSSL Do you need more details? |
|
system.log while/after reboot from both machines |
|
My system.log after reboot from my opnsense |
|
No overlapping changes in the file, as easy as |
|
@fichtner I just tested a bit with the patch active and after a reboot the routes are now successfully applied (at least at two tries). But unfortunately after a WAN interface down/up even, the routes are still missing. This is now a slightly different situation. Is there a different issue already for that one? I think an issue might be, that when the WAN IP does not change, that routes are not re-applied: Lines 151 to 165 in 6529ef7
|
|
@8191 I'm aware the issue shifts to WAN reload now. Since I don't know what changes it's difficult to tell. You can try to delete the cache file and call rc.newwanip directly to force all the reloads. Although that only gives a 50% chance that it will work since |
|
Hi all. |
|
Ok, no problem, just done. |
|
@8191 Did the fix solved the problem for you? I can see under 10-newwanip content is patched After sys reboot i can't see my GRE vti routes up, notice that they're up on GUI I still have to manually disable and re-enable routes from GUI to have them to work. |
|
@peironem Does a click on "Apply" (without any changes) in the GUI add the routes? |
|
@8191 Yeah, you are right. If i do nothing but clicking on Apply button on System > Routes > Configuration via GUI, routes actually raise up again. Any ideas? |
|
It's the same issue but your boot does not trigger reload in 10-newwanip, maybe because of static WAN config? |
@fichtner Yeah, sure, my WAN is configured as static IPv4 interface facing on MPLS network with an isp given IP. |
|
@peironem not yet, but your setup is simple enough to find out why I hope... So the odd thing is we configure interfaces including GRE here: Line 98 in 1a646e0
And then later run the code that should put the routes in place: Line 104 in 1a646e0
But at the end of the boot sequence the routes are not there, which means:
You say applying the routes from System > Routes > Configuration works. Does running /usr/local/etc/rc.routing_configure have the same effect? Trying to rule out (1) here... Cheers, |
|
@fichtner Wouldn't it be better to focus on a solution with IPsec tunnel establishment than with WAN interface startup? |
|
@fichtner just tried. |
|
Hi @fichtner, Thanks in advance. |
|
Just a little update here: |
|
highly unlikely, non of that code originates from there.... |
|
The problem still persists, you can test it by just restarting IPsec VPN then the route is gone and you have to click apply to add it back. a small workaround but hopefully fixed soon |
|
Can confirm this bug on Opnsense 21.1.4. I've encountered it while troubleshooting Routed IPsec + FRR OSPF here |
|
5 minutes ago I update a live OPNsense from 21.1.2 to 21.1.5 which has a route based IPsec to GCP, after reboot the tunnel is up, traffic is there and static routes are in kernel. |
|
As some form of mitigation, would it be possible to attach the |
|
I have added an unconditional routing reconfigure after boot to address this via 3e4df24 No need to keep this ticket open any longer. If someone has a way to reproduce the actual issue while configuring a VTI tunnel with a static route let us know. |

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
[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
We have setup route-based IPsec with the necessary gateway. We added a static route for our remote LAN that points to the IPsec gateway. After reboot the static route does not get applied anymore (still visible in Configuration but not in Status). Similar issue #2388.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Route being set
Screenshots

Relevant log files
Cannot find anything in the logs
Environment
OPNsense 19.1.4-amd64
Intel(R) Xeon(R) CPU D-1518 @ 2.20GHz (8 cores)
Network Intel® I210-AT
The text was updated successfully, but these errors were encountered: