]> 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:28:42 +0000 (09:28 +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>
src/openvpn/options.c

index 41a42cf2faa5a0ba259d039e09ad151843c02179..e0c0894b9ad7b6ebfec22fa1d103dc820d19ba81 100644 (file)
@@ -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
 
     /*