2014-02-09 16:34 GMT+01:00 Arne Schwabe <a...@rfc2549.org>: > Am 09.02.14 16:19, schrieb Gert Doering: >> Hi, >> >> On Sun, Feb 09, 2014 at 02:41:58PM +0100, Mickael Chazaux wrote: >>> Although it is not easy to find on the Internet, you can bind a client >>> socket to a specific IP adress, while setting the port as 0, meaning >>> "choose for me". >> Ah, good. So there *is* a "I do not want a specific port" setting. >> >> Seems we need to improve documentation :-) (but maybe the new code >> from Arne that went into 2.4-to-be already does this properly, as in, >> "not require --lport setting for --bind") >> >> > Does lport 0 work? >
Yes. I use it (see my previous mail). But it is not documented in openVPN, and the use of a port value of 0 in bind() hardly. In the source the --lport value is sent to bind() directly, so it happens to work. It would be great if --lport 0 were mentioned in the manual, to avoid breaking this behavior in the future. Mickael