-
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
openvpn: multiple remote server support (client and client export) #952
Comments
|
Any intentions to push this one? :) |
|
sure, just let me know what to do :D |
|
For the beginning multiple remote entries for OPN as a client would just be fine: https://community.openvpn.net/openvpn/wiki/GettingStartedwithOVPN |
|
@fichtner No chance for a quick addition with "same protocol only"? |
|
separate hosts by comma maybe? |
|
If it ends like this in config export: YES :) |
|
yep To be able to move further than this we would really need to join the port and protocol and host in a new type of model format so let's try the easier one first :) |
|
@mimugmail Now I wanted to do this but I ended up confused... how do we export configs for clients?! This is about the OpenVPN client, at least the original ticket was. |
|
You're right, it's just for OPN as Client. I had a case at Sophos with similar stuff and mixed it up. |
|
Alright, you can add several servers to the same field now separated by whitespace or comma. Validation works and normalises the input for the config into a simple CSV so it also works with the original entries (or looks like it). What I don't like is that we should probably make the port flexible as well and support a sane resolv-retry and random-remote directives... |
|
@mimugmail Only because I really like you and @AdSchellevis would beat me for doing stupid stuff like the previous commit: 58061809d48 |
|
Now we support: o Multiple client server/port combinations (requires also the former patch) |
|
Whohooo :) I'll setup a testbed here as soon as I have finished my client stuff! Really appreciated 🥇 |
|
Good news .. in principal it's working!
|
|
Seems my cron hack to rc.newwanip breaks when using with openvpn, but seems only relevant for my own setup |
|
Are you using DNS? "resolve-retry 60" may cause this. We can lower to 10 seconds or remove it again. It doesn't matter for multi-remote. But I don't know what the default is. |
|
Regarding 2. -- server binds to "any"? that's really inconvenient. it goes out the default route or current gateway rule. |
|
der default is 5 sekunden, ich nehm die 60 wieder raus |
|
|
No, I'm using just IP addresses. Perhaps lowering keepalive value help. |
|
Tested again, failover took 140sec. :) |
|
maybe the connection timeout / keepalive then? |
|
Oh, forget it .. I reenabled the primary WAN and then this happens: |
|
So, when WAN1 disabled, took 140s to take over to WAN2 and then ping was working, after reenabling WAN1 replys are sent over WAN1 (also with source IP of WAN1) |
|
|
is that ping weirdness with or without default gw switching? |
|
Yes, gw switching enabled, no rules with GWGROUPS active. |
|
This was down and switchover at the client And when reenabling WAN: |
|
Oh, after 2 minutes it's working again as WAN2 wasnt alive since replys came from WAN1 IP .. so a double error fixed it :D |
|
Funny thing, today I stopped WAN2 (static) where OpenVPN was conntected to, switched to WAN1 (DHCP) and everything work. But at 9:00 my half hour cron with "rc.newwanip WAN1" kicked in and did this: WAN_LWL get's resynced and there seems to be a process to switch the default gateway to other if no matter what the status is, because the switchport of Default_WAN (217.5.204.209) is down. Now there's the situation where where both interfaces aren't reachable. |
|
@fichtner
Perhaps this stop some things which results in this fuzzy multi wan errors |
|
And when WAN2 (static) comes back, it sets default route to WAN2 again and WAN1 is reachable again? :) |
|
https://github.com/opnsense/core/blob/master/src/etc/rc.newwanip#L164 This returns the exit 1 core cause it doesn't respect/exclude interfaces which are in false/error state |
|
Summary of yesterdays checks:
Suspicion was that WAN1 was DHCP and doesn't have a fixed gateway in interfaces. Changed to static and set a gateway doesn't fix this behavior also. So with UDP a packet entering WAN2 gets replied on WAN1, also with source address of WAN1, BUT: only when the way between is broken and the interface is UP. BUT2: access to TCP services work as expected on WAN1 and WAN2. Next tests are with different services relying on UDP to check if it's multiwan or OpenVPN |
|
@fichtner any chance to get the multiremote support in 17.7.6? Since the open topics are not related to OpenVPN itself it would be nice to have this on stable |
|
I think so :) |
|
I'm closing this. No apparent need to support multi-remote client export at this point. |

It could be useful to add directly from the GUI multiple remote servers (ip and port) and an option to enable random server (--remote-random).
Thanks
The text was updated successfully, but these errors were encountered: