summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-02-11 07:16:02 +0100
committerGitHub <noreply@github.com>2022-02-11 07:16:02 +0100
commit01c8330ca446e9bc9dde6a59357a06ee6ed2b86c (patch)
tree16ffca7749ace22b7f5e2790b8c8317fff1da7cd /op-mode-definitions
parent1f4e5c6daf4a88abd0982963fdd559dd6f15bd21 (diff)
parent7f7be911b749b6c65ac3c6e57192e9e4ce2dcd24 (diff)
downloadvyos-1x-01c8330ca446e9bc9dde6a59357a06ee6ed2b86c.tar.gz
vyos-1x-01c8330ca446e9bc9dde6a59357a06ee6ed2b86c.zip
Merge pull request #1217 from sever-sever/T4236
openvpn: T4236: Add generator for ovpn configurations in op-mode
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/generate-openvpn-config-client.xml.in58
1 files changed, 58 insertions, 0 deletions
diff --git a/op-mode-definitions/generate-openvpn-config-client.xml.in b/op-mode-definitions/generate-openvpn-config-client.xml.in
new file mode 100644
index 000000000..4f9f31bfe
--- /dev/null
+++ b/op-mode-definitions/generate-openvpn-config-client.xml.in
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="openvpn">
+ <properties>
+ <help>Generate OpenVPN client configuration ovpn file</help>
+ </properties>
+ <children>
+ <node name="client-config">
+ <properties>
+ <help>Generate Client config</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Local interface used for connection</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --type openvpn</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="ca">
+ <properties>
+ <help>CA certificate</help>
+ <completionHelp>
+ <path>pki ca</path>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="certificate">
+ <properties>
+ <help>Cerificate used by client</help>
+ <completionHelp>
+ <path>pki certificate</path>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="key">
+ <properties>
+ <help>Certificate key used by client</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/generate_ovpn_client_file.py --interface "$5" --ca "$7" --cert "$9" --key "${11}"</command>
+ </tagNode>
+ </children>
+ <command>sudo ${vyos_op_scripts_dir}/generate_ovpn_client_file.py --interface "$5" --ca "$7" --cert "$9"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>