OpenVPN Add listen adresses
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.
Is your feature request related to a problem? Please describe.
currently it is not possible to define a listen address in the openvpn server. For example if you have multiple ips on the wan interface you can't define one ip for vpns and run the vpn server with it. With other functions like: the HAProxy or Postfix it is possible to define a individual listen address.

Describe the solution you'd like
the possibility to setup one or more IPs in the openvpn server configuration
Describe alternatives you've considered
the workaround is currently: let vpn server listen to localhost and setup a port forwarding from the ip to localhost.
Add an Alias and you can select it in Interface section
OpenVPN config itself is rather restrictive so comparing with HAProxy is a bit difficult to accomplish. Have you consulted the OpenVPN documentation on the subject?
Add an Alias and you can select it in Interface section
Thats is the solution. Thank you.
OpenVPN config itself is rather restrictive so comparing with HAProxy is a bit difficult to accomplish. Have you consulted the OpenVPN documentation on the subject?
I thought about the "local" parameter.
Solved. Using an IP Alias in the Interface section. Binding Dualstack is not possible in this configuration. As far as i know its only possible while listening to "all" Interfaces. But that is an Upstream "issue".
Yep, this is how to trigger the "local" directive. Just double-checked the code. Unfortunately OpenVPN can't specify more than one address so dual-stack is only possible without local address.
Yep, this is how to trigger the "local" directive. Just double-checked the code. Unfortunately OpenVPN can't specify more than one address so dual-stack is only possible without local address.
Would socat be a solution? Socat is is already shipped in the image. As a plugin one could forward maybe an ipv6 adress to the openvpn socket or another ipv4.
So one could archieve an "dualstack" openvpn config while listening on defined adresses. It Could also be useful for other things.
If you get the socat daemon running in production and use it für multiprotocol I can build a plugin.
You can use NAT rules to do the same already. No particular need for socat.