man: Add .TQ groff support macro
PATCH 1/3 man: Add .TQ groff support macro
This introduces the .TQ groff macro. Even though this can be found in newer groff versions, not all platforms we support carries this one.
This macro makes it possible to have mulitple lines of options as headers before describing all of these options in the same segment.
--- doc/openvpn.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
doc/openvpn.8 +9 -1
@@ -33,7 +33,15 @@ .\" .ft -- normal face .\" .in +|-{n} -- indent .\" -.TH openvpn 8 "31 January 2018" +.\" Support macros - this is not present on all platforms +.\" Continuation line for .TP header. +.de TQ +. br +. ns +. TP \\$1\" no doublequotes around argument! +.. +.\" End of TQ macro +.TH openvpn 8 "28 February 2018" .\"********************************************************* .SH NAME openvpn \- secure IP tunnel daemon.
Signature · 1 line
2.13.5
PATCH 2/3 man: Reword --management to prefer unix sockets over TCP
It is more secure to use unix sockets instead of TCP ports for the management interface, so reword it and provide some details why TCP is not recommended.
Also re-arranged this section to be somewhat easier to read and clearer on a few related details.
---
This patch depends on the .TQ macro. If the support macro patch has not been applied, it will not render nicely on platforms not containing .TQ support.
--- doc/openvpn.8 | 76 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 39 deletions(-)
doc/openvpn.8 +37 -39
@@ -2555,54 +2555,52 @@ the compression efficiency will be very low, triggering openvpn to disable compression for a period of time until the next re\-sample test. .\"********************************************************* .TP +.B \-\-management socket\-name unix [pw\-file] \ \ \ \ \ (recommended) +.TQ .B \-\-management IP port [pw\-file] -Enable a TCP server on -.B IP:port -to handle daemon management functions. -.B pw\-file, -if specified, -is a password file (password on first line) -or "stdin" to prompt from standard input. The password -provided will set the password which TCP clients will need -to provide in order to access management functions. +Enable a management server on a +.B socket\-name +Unix socket on those platforms supporting it, or on +a designated TCP port. -The management interface can also listen on a unix domain socket, -for those platforms that support it. To use a unix domain socket, specify -the unix socket pathname in place of -.B IP -and set -.B port -to 'unix'. While the default behavior is to create a unix domain socket -that may be connected to by any process, the +.B pw\-file +, if specified, is a password file where the password must be on first line. +Instead of a filename it can use the keyword stdin which will prompt the user +for a password to use when OpenVPN is starting. + +For unix sockets, the default behaviour is to create a unix domain socket +that may be connected to by any process. Use the .B \-\-management\-client\-user and .B \-\-management\-client\-group -directives can be used to restrict access. +directives to restrict access. -The management interface provides a special mode where the TCP -management link can operate over the tunnel itself. To enable this mode, -set -.B IP -= "tunnel". Tunnel mode will cause the management interface -to listen for a TCP connection on the local VPN address of the -TUN/TAP interface. +The management interface provides a special mode where the TCP management link +can operate over the tunnel itself. To enable this mode, set IP to +.B tunnel. +Tunnel mode will cause the management interface to listen for a +TCP connection on the local VPN address of the TUN/TAP interface. -While the management port is designed for programmatic control -of OpenVPN by other applications, it is possible to telnet -to the port, using a telnet client in "raw" mode. Once connected, -type "help" for a list of commands. +.B BEWARE +of enabling the management interface over TCP. In these cases you should +.I ALWAYS +make use of +.B pw\-file +to password protect the management interface. Any user who can connect to this +TCP +.B IP:port +will be able to manage and control (and interfere with) the OpenVPN process. +It is also strongly recommended to set IP to 127.0.0.1 (localhost) to restrict +accessibility of the management server to local clients. -For detailed documentation on the management interface, see -the management\-notes.txt file in the -.B management -folder of -the OpenVPN source distribution. +While the management port is designed for programmatic control of OpenVPN by +other applications, it is possible to telnet to the port, using a telnet client +in "raw" mode. Once connected, type "help" for a list of commands. + +For detailed documentation on the management interface, see the +.I management\-notes.txt +file in the management folder of the OpenVPN source distribution. -It is strongly recommended that -.B IP -be set to 127.0.0.1 -(localhost) to restrict accessibility of the management -server to local clients. .TP .B \-\-management\-client Management interface will connect as a TCP/unix domain client to
Signature · 1 line
2.13.5
[Openvpn-devel] [PATCH applied] Re: man: Reword --management to prefer unix sockets over TCP
as discussed on IRC this morning.
Your patch has been applied to the master and release/2.4 branch.
commit ec100d7e4ce7aaeb731c22b0d86826bf295df6cd (master) commit e5ee5121cbbeca6dcbee38dea5b40779e3f6da83 (release/2.4)
Author: David Sommerseth Date: Wed Feb 28 14:19:17 2018 +0100
man: Reword --management to prefer unix sockets over TCP
Signed-off-by: David Sommerseth <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg16573.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
PATCH 3/3 management: Warn if TCP port is used without password
In reply to David SommersethIt is not recommended to use --management on a TCP port without also adding a password authentication, as this can easily be abused by other users or processes being able to connect to the managmement interface.
Thus issue a warning that this configuration is strongly discouraged.
--- src/openvpn/options.c | 8 ++++++++ 1 file changed, 8 insertions(+)
src/openvpn/options.c +8 -0
@@ -2170,6 +2170,14 @@ options_postprocess_verify_ce(const struct options *options, const struct connec {msg (M_USAGE ,"--management-client-(user|group) can only be used on unix domain sockets" ); } + +if (!(options->management_flags &MF_UNIX_SOCK ) + && (!options->management_user_pass)) + { +msg (M_WARN ,"WARNING: Using --management on a TCP port WITHOUT " +"passwords is STRONGLY discouraged and considered insecure" ); + } +#endif /*
Signature · 1 line
2.13.5
Re: [Openvpn-devel] [PATCH 3/3] management: Warn if TCP port is used without password
Am 28.02.18 um 14:19 schrieb David Sommerseth:
Quoted 21 lines
It is not recommended to use --management on a TCP port without also adding a password authentication, as this can easily be abused by other users or processes being able to connect to the managmement interface.
Thus issue a warning that this configuration is strongly discouraged.
Signed-off-by David Sommerseth <[email protected]...>--- src/openvpn/options.c | 8 ++++++++ 1 file changed, 8 insertions(+)src/openvpn/options.c +1
-0@@ -2170,6 +2170,14 @@ options_postprocess_verify_ce(const struct options *options, const struct connec {msg (M_USAGE ,"--management-client-(user|group) can only be used on unix domain sockets" ); } +
src/openvpn/options.c options_postprocess_verify_ce(const struct options *options, const struct connec · line 2183
Quoted 10 lines
src/openvpn/options.c +7
-0+if (!(options->management_flags &MF_UNIX_SOCK ) + && (!options->management_user_pass)) + { +msg (M_WARN ,"WARNING: Using --management on a TCP port WITHOUT " +"passwords is STRONGLY discouraged and considered insecure" ); + } +#endif /*
Does not break existing configs and warns about a real problem. Some users of management might scream that, users now get a warning none was before but honestely I don't care.
@All does our own Windows UI use management and if yes does it set a random user/pw to connect to it?
Arne
Re: [Openvpn-devel] [PATCH 3/3] management: Warn if TCP port is used without password
Hi,
Quoted 37 lines · Arne Schwabe
Am 28.02.18 um 14:19 schrieb David Sommerseth:
Quoted 21 lines
It is not recommended to use --management on a TCP port without also adding a password authentication, as this can easily be abused by other users or processes being able to connect to the managmement interface.
Thus issue a warning that this configuration is strongly discouraged.
Signed-off-by David Sommerseth <[email protected]...>--- src/openvpn/options.c | 8 ++++++++ 1 file changed, 8 insertions(+)src/openvpn/options.c +1
-0@@ -2170,6 +2170,14 @@ options_postprocess_verify_ce(const struct options *options, const struct connec {msg (M_USAGE ,"--management-client-(user|group) can only be used on unix domain sockets" ); } +src/openvpn/options.c options_postprocess_verify_ce(const struct options *options, const struct connec · line 2183
Quoted 10 lines
src/openvpn/options.c +7
-0+if (!(options->management_flags &MF_UNIX_SOCK ) + && (!options->management_user_pass)) + { +msg (M_WARN ,"WARNING: Using --management on a TCP port WITHOUT " +"passwords is STRONGLY discouraged and considered insecure" ); + } +#endif /* Does not break existing configs and warns about a real problem. Some users of management might scream that, users now get a warning none was before but honestely I don't care.
Quoted 2 lines
@All does our own Windows UI use management and if yes does it set a random user/pw to connect to it?
Yes and yes.
Selva
[Openvpn-devel] [PATCH applied] Re: management: Warn if TCP port is used without password
In reply to David SommersethYour patch has been applied to the master and release/2.4 branch.
commit 4db7715a3aa62f2e8d8234c1852fb141f62318e2 (master) commit ab218befec67dc0f5bb08973d2ec3476350f9ab3 (release/2.4)
Author: David Sommerseth Date: Wed Feb 28 14:19:18 2018 +0100
management: Warn if TCP port is used without password
Signed-off-by: David Sommerseth <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg16574.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
(Tested on FreeBSD 9, where .TQ is not available out of the box)
Your patch has been applied to the master and release/2.4 branch.
commit 5ed5ac5cf869c0284ffeedda358da23e201357cc (master) commit c5a63d5a6ea78bee069cc503e0a396decfbbaf0e (release/2.4)
Author: David Sommerseth Date: Wed Feb 28 14:19:16 2018 +0100
man: Add .TQ groff support macro
Signed-off-by: David Sommerseth <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg16575.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering