-
Notifications
You must be signed in to change notification settings - Fork 3.3k
OpenVPN 2.7.0: lport is ignored inside <connection> #995
Description
Reported in Debian in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1129362
Hi.
remote some.openvpn.srv 1234 udp lport 54321
Option "lport" worked inside .. blocks in
versions up to 2.6.15, and is broken in all 2.7.x (since alpha1-1).
Example of typical configuration:should result in src_port=54321 in UDP packets. It works in 2.6.x,
but in 2.7.x versions src_port is set to global default (1194).OpenVPN manual says:
| The following OpenVPN options may be used inside of a
| block:
|
| bind, connect-retry, connect-retry-max, connect-timeout, ex‐
| plicit-exit-notify, float, fragment, http-proxy, http-proxy-option,
| key-direction, link-mtu, local, lport, mssfix, mtu-disc, nobind, port,
| proto, remote, rport, socks-proxy, tls-auth, tls-crypt, tls-crypt-v2,
| tun-mtu and, tun-mtu-extra.
|
| A defaulting mechanism exists for specifying options to apply to all
| profiles. If any of the above options (with the exception
| of remote ) appear outside of a block, but in a configura‐
| tion file which has one or more blocks, the option setting
| will be used as a default for blocks which follow it in the
| configuration file.If the lport value is redefined globally (outside blocks),
it is applied for all blocks in 2.7.x, regardless of local definitions.
In 2.6.x local definition supersede global default, as it should be.Ignorance of other directives inside is desirable to be
checked for versions 2.7.x. Tested on amd64 systems.