diff options
author | Viacheslav <v.gletenko@vyos.io> | 2021-08-13 15:48:14 +0000 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-14 20:38:04 +0200 |
commit | ceb623bbd6583cf290b57a223851f178abb23d6f (patch) | |
tree | 170b3ab61113cfdaa3782cf95b7d218c11d580a2 /src | |
parent | 4a79ca1b27af3d3c9d333ba428e4c0f3fa62dd3c (diff) | |
download | vyos-1x-ceb623bbd6583cf290b57a223851f178abb23d6f.tar.gz vyos-1x-ceb623bbd6583cf290b57a223851f178abb23d6f.zip |
openvpn: T3738: Disable authentication option for server mode
(cherry picked from commit 655876f4c22c0f4ea839a81f4af09d6016e19197)
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/interfaces-openvpn.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py index 981a45c88..0a420f7bf 100755 --- a/src/conf_mode/interfaces-openvpn.py +++ b/src/conf_mode/interfaces-openvpn.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019-2020 VyOS maintainers and contributors +# Copyright (C) 2019-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -188,6 +188,9 @@ def verify(openvpn): if openvpn['protocol'] == 'tcp-active': raise ConfigError('Protocol "tcp-active" is not valid in server mode') + if dict_search('authentication.username', openvpn) or dict_search('authentication.password', openvpn): + raise ConfigError('Cannot specify "authentication" in server mode') + if 'remote_port' in openvpn: raise ConfigError('Cannot specify "remote-port" in server mode') |