summaryrefslogtreecommitdiff
path: root/templates/reset
diff options
context:
space:
mode:
Diffstat (limited to 'templates/reset')
-rw-r--r--templates/reset/vpn/ipsec-peer/node.def1
-rw-r--r--templates/reset/vpn/ipsec-peer/node.tag/node.def6
-rw-r--r--templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.def1
-rw-r--r--templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.tag/node.def10
-rw-r--r--templates/reset/vpn/node.def1
5 files changed, 19 insertions, 0 deletions
diff --git a/templates/reset/vpn/ipsec-peer/node.def b/templates/reset/vpn/ipsec-peer/node.def
new file mode 100644
index 0000000..0faaf8f
--- /dev/null
+++ b/templates/reset/vpn/ipsec-peer/node.def
@@ -0,0 +1 @@
+help: Reset all tunnels for given peer
diff --git a/templates/reset/vpn/ipsec-peer/node.tag/node.def b/templates/reset/vpn/ipsec-peer/node.tag/node.def
new file mode 100644
index 0000000..fa55d52
--- /dev/null
+++ b/templates/reset/vpn/ipsec-peer/node.tag/node.def
@@ -0,0 +1,6 @@
+help: Reset all tunnels for given peer
+
+allowed: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=get-all-peers
+
+run: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl \
+ --op=clear-tunnels-for-peer --peer="$4"
diff --git a/templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.def b/templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.def
new file mode 100644
index 0000000..f0f2768
--- /dev/null
+++ b/templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.def
@@ -0,0 +1 @@
+help: Reset a specific tunnel for given peer
diff --git a/templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.tag/node.def b/templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.tag/node.def
new file mode 100644
index 0000000..eecb740
--- /dev/null
+++ b/templates/reset/vpn/ipsec-peer/node.tag/tunnel/node.tag/node.def
@@ -0,0 +1,10 @@
+help: Reset a specific tunnel for given peer
+
+allowed: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl \
+ --op=get-tunnels-for-peer \
+ --peer="${COMP_WORDS[COMP_CWORD-2]}"
+
+run: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl \
+ --op=clear-specific-tunnel-for-peer \
+ --peer="$4" \
+ --tunnel="$6"
diff --git a/templates/reset/vpn/node.def b/templates/reset/vpn/node.def
new file mode 100644
index 0000000..9f17a21
--- /dev/null
+++ b/templates/reset/vpn/node.def
@@ -0,0 +1 @@
+help: Reset Virtual Private Network (VPN) information