-
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
IPSec Route missing after WAN DHCP Renew (#3414 related?) #5263
Comments
|
Patches are all there. I was sort of expecting this edge case to come up eventually. Can you tell me which interface ipsec is running on? Which interface are your broken routes on? Which interface(s) are your WAN(s)? Thanks, |
|
On my OPNsense 21.7.3_3-amd64 with the static route to IPsec gw the route needs the be re-applied when the ipsec tunnel is restarted. I tried a very similar config as @HamburgerJungeJr. |
|
Merged via 35992e7 to development version. Might not be patchable using opnsense-patch as there are more ipsec changes in the pipline. |
|
GitHub closed this, but I'll leave it open for later feedback. |
|
I applied the patch and it seems to work now. |
|
@HamburgerJungeJr thanks so far! patches on top of 21.7.3 indeed... if someone else wants to try: Cheers, |
|
@fichtner will we be able to get your patch via 21.7 updates or do I need to wait for the next major release? I don't have experience applying patches to the live system. Can I go in as root and issue" opnsense-patch 35992e7" which will fix the IP-sec static routing reactivation after interface flap? And after applying the temp-patch and the mainline updates will be patch be overwritten? |
|
@rfc4711 on top of 21.7.3 you can install the patch from the command line using: Judging by early feedback it might make 21.7.4 or 21.7.5. We will discuss it later this week and all further feedback is highly appreciated. Cheers, |
|
Hi @fichtner, I applied the patch on both sides, however, it does not seem to work for restarting the IPSEC tunnel. Configured the far gateway and the static routes to the loopback addresses, tunnel is up. The ping to addresses via static routes is working from both sides. Restarted the IPSEC process on "brick", after sequence 30 no more connectivity. The route is gone from brick to 10.169.3.2/32 (loopback on shadow) the tunnel is up and I have one-sided traffic possible where I can ping from the remote side on shadow to the loopback 10.169.1.3/32 on brick. -> went into System->Routes->Configuration and hit Apply on "brick". I was thinking to add static routes to each FW loopback address and then configure BGP neighbors, with this method I could backup the IPSEC tunnel with OpenVPN without having to change routing. |
|
It shouldn't restart a service, only re-apply static routes. Keeping sessions after failure is a responsibility of the service in question (IPsec) using options like dead peer detection. |
|
@rfc4711 doesn't sound like same problem. Might be better to discuss your use case in the forum first. |
|
After a few days of testing I think there is still an issue. Right now I tried to get a new WAN-IP, which didn't change because I think I have to reboot the modem to get a new IP-Address from my provider. Bu ttha tshould not be the issue. The problem is that after an IP-Renew the vpn get reconnected and the route ist applied again, but I can ping the remote network only from my machine. It is not possible to ping the remote network from the opnsense itself. Therefore Unbound cant resolve the DNS-Names forwarded to the remote DNS-Server. I checked the routes from the opnsense shell with netstat -r and the route is configured. |
|
@HamburgerJungeJr I'm not sure what the issue is but having this here only deal with routing and the route being there it's difficult to extrapolate what could be wrong now. |
|
@HamburgerJungeJr is your remote endpoint a hostname? and if so, can you check if the issue disappears when choosing a static ip address. |
The remote IPSec Endpoint has an static IP, the local IPSec Endpoint has a dynamic IP-Address with a Dyn-DNS-Hostname. |
|
I would expect there are some messages in the system log in that case about the removal of the ipsec vti device (which also holds ownership of the routes). |
When local or remote isn't set to an ip address every configure will start removing the current device (and thus routes), although hostnames will likely always be a bit wacky (needs resolving, might change in which case the underlaying components likely miss the event). It's probably still a good idea to resolve when no addresses are used before concluding a device has changed. In the process change ipsec_resolve() to support both IPv4 and IPv6, but to limit risk, keep callers at IPv4 (which was the old behaviour), since it's not entirely sure we can use the phase 1 protocol for the tunnel itself as well.
|
might be 2202b02 |
|
One of our customers with the same issue reports back that |
|
showing unassigned hosts has no relation to this patch, it's just an improvement in the latest version so you can easily inspect status of these interfaces (which is particular very practical for lag interfaces and their children). So, sounds like case closed then? |
|
Thanks for the clarification. From my point of view the issue seems to fixed so it can be closed. |
|
thanks for the feedback, let's close this then. We'll discuss next week what todo with 35992e7 |
|
@AdSchellevis if it's not needed it should be removed of course |
|
@fichtner let's check next week or so and weight the pro's and cons, there's no rush. |
When local or remote isn't set to an ip address every configure will start removing the current device (and thus routes), although hostnames will likely always be a bit wacky (needs resolving, might change in which case the underlaying components likely miss the event). It's probably still a good idea to resolve when no addresses are used before concluding a device has changed. In the process change ipsec_resolve() to support both IPv4 and IPv6, but to limit risk, keep callers at IPv4 (which was the old behaviour), since it's not entirely sure we can use the phase 1 protocol for the tunnel itself as well. (cherry picked from commit 2202b02) (cherry picked from commit 27d30a7) (cherry picked from commit 35992e7)










Important notices
Our forum is located at https://forum.opnsense.org , please consider joining discussions there in stead of using GitHub for these matters.
Before you ask a new question, we ask you kindly to acknowledge the following:
Hi,
I have a routed IPSec-Tunnel to our corporate network.
After a WAN-DHCP renew the routes to the IPSec-Tunnel are no longer available in the Status list. But they are still active under configuration.
If I disable the route and re-enable it the IPSec tunnel works again. So I'm pretty sure its an issue with the route.
So I think its the same issue as in #3414.
I'm running Opnsense 21.7.2_1. Do I need to apply some patches? Or are the in #3414 mentioned patches (9046727, 3e4df24) already applied?
The text was updated successfully, but these errors were encountered: