core icon indicating copy to clipboard operation
core copied to clipboard

OpenVPN Multi Socket Support

Open tomatotoast opened this issue 6 months ago • 6 comments

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

  • [X] I have read the contributing guidelines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
  • [X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Is your feature request related to a problem? Please describe.

Currently OPNsense 26.1.9-amd64 ships with openvpn 2.7.4 which supports multiple "local" variables. The WebUI currently only supports binding the openvpn instance to all IPs or just one ip.

Describe the solution you like

Allow configuring multiple "local" IP and port combinations. like:

local 10.10.10.10 1194
local 2001:db8::1 1194

Additional context

This new feature of openvpn has been published in the media: https://www.heise.de/en/news/OpenVPN-2-7-0-with-multi-socket-support-and-new-Windows-driver-11174406.html

tomatotoast avatar Jun 03 '26 07:06 tomatotoast

With multi socket support it is possible to build dual stack setups per interface.

tomatotoast avatar Jun 03 '26 08:06 tomatotoast

we're still thinking about it as it doesn't seem to offer a performance improvement as both will have the same (single core) bottleneck. Spinning multiple instances with the same configuration in practice might be a better alternative, but requires more work.

AdSchellevis avatar Jun 03 '26 09:06 AdSchellevis

I dont think about this from a performance perspective. In my scenario i have multiple IPs on some interfaces with different services on them. On one ip there is NGINX running on Port 443 (dualstack). On the other interface maybe something else.

When you allow openvpn to bind on multiple different ips one can run it on tcp 443 on a interface with dualstack. The default config "*.443" (binding to all interfaces and ips) would cause issues with other applications like nginx.

tomatotoast avatar Jun 03 '26 10:06 tomatotoast

+1 This also lets me to use same IP subnet for VPN clients on both TCP and UDP.

r-duran avatar Jul 13 '26 13:07 r-duran

+1 This also lets me to use same IP subnet for VPN clients on both TCP and UDP.

We prefer UDP, but TCP on Port 443 works even through restrictiv Firewall like Hotels, etc and some Providers with Dual-Stack Lite and Carrier-Grade-NAT. With legacy we call a Script (learn-address under Advanced) to update the route to the client, if Protocol/Server-Instance has switched.

bbaumer avatar Sep 21 '26 08:09 bbaumer

Would love to see this for an easy fallback to TCP, which I suppose is the primary use case of said protocol. If anyone is particularly concerned about performance, they may always decide to run a second instance as before.

thijsvandien avatar Oct 10 '26 17:10 thijsvandien