]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
management: Warn if TCP port is used without password
authorDavid Sommerseth <davids@openvpn.net>
Wed, 28 Feb 2018 13:19:18 +0000 (14:19 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 1 Mar 2018 08:29:23 +0000 (09:29 +0100)
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 <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20180228131918.12954-3-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16574.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 4db7715a3aa62f2e8d8234c1852fb141f62318e2)

src/openvpn/options.c

index 3f9164c78937224673c1f06f3759a7cba464c6ee..a0076309cb40c2ca390fd4abbedc5f74bbc00202 100644 (file)
@@ -2189,6 +2189,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
 
     /*