summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Leung <jleung@v10networks.ca>2015-12-06 03:16:38 -0500
committerUnicronNL <khagen@multi.eu>2016-05-11 07:54:20 +0200
commit578688a25ba784d839512fefafab4cabdaf32fc5 (patch)
tree2bb49b80d0602f3cadb5714845c53b39304a3b6b
parent1f7528e003d6c1d3c061065fa44773caf74874a9 (diff)
downloadvyatta-op-vpn-578688a25ba784d839512fefafab4cabdaf32fc5.tar.gz
vyatta-op-vpn-578688a25ba784d839512fefafab4cabdaf32fc5.zip
Simpilfy the operational commands
Instead of trying to parse the outout of ipsec or swanctl, just dump whatever swanctl outputs.
-rw-r--r--templates/show/vpn/ipsec/sa/detail/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/peer/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/profile/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/nat-traversal/node.def2
-rw-r--r--templates/show/vpn/ipsec/sa/node.def9
-rw-r--r--templates/show/vpn/ipsec/sa/peer/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/peer/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/profile/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/profile/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/peer/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/profile/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.def1
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def3
28 files changed, 7 insertions, 58 deletions
diff --git a/templates/show/vpn/ipsec/sa/detail/node.def b/templates/show/vpn/ipsec/sa/detail/node.def
deleted file mode 100644
index 1397817..0000000
--- a/templates/show/vpn/ipsec/sa/detail/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA)
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-detail
- sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-detail
diff --git a/templates/show/vpn/ipsec/sa/detail/peer/node.def b/templates/show/vpn/ipsec/sa/detail/peer/node.def
deleted file mode 100644
index bbb34b8..0000000
--- a/templates/show/vpn/ipsec/sa/detail/peer/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA) for a peer
diff --git a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def b/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def
deleted file mode 100644
index cad43ba..0000000
--- a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA) for a peer
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-peers-for-cli
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-peer-detail="$7"
diff --git a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.def
deleted file mode 100644
index 1bc4f2f..0000000
--- a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show details for the active IPsec Security Association (SA) for a peer's tunnel
diff --git a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def
deleted file mode 100644
index 470578e..0000000
--- a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for the active IPsec Security Associations (SA) for a peer's tunnel
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-conn-detail $7 $9
diff --git a/templates/show/vpn/ipsec/sa/detail/profile/node.def b/templates/show/vpn/ipsec/sa/detail/profile/node.def
deleted file mode 100644
index 00a4e7c..0000000
--- a/templates/show/vpn/ipsec/sa/detail/profile/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA) for a profile
diff --git a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def b/templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def
deleted file mode 100644
index fbb6218..0000000
--- a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA) for a profile
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --get-profiles-for-cli
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-profile-detail="$7"
diff --git a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.def
deleted file mode 100644
index 58100d8..0000000
--- a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show details for the active IPsec Security Association (SA) for a tunnel bound to profile
diff --git a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def
deleted file mode 100644
index ac5fd14..0000000
--- a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for the active IPsec Security Associations (SA) for a tunnel bound to profile
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-conn-detail $7 $9
diff --git a/templates/show/vpn/ipsec/sa/nat-traversal/node.def b/templates/show/vpn/ipsec/sa/nat-traversal/node.def
deleted file mode 100644
index 7ea610b..0000000
--- a/templates/show/vpn/ipsec/sa/nat-traversal/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Show all active IPsec Security Associations (SA) that are using NAT Traversal
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-natt
diff --git a/templates/show/vpn/ipsec/sa/node.def b/templates/show/vpn/ipsec/sa/node.def
index 287d489..be8f108 100644
--- a/templates/show/vpn/ipsec/sa/node.def
+++ b/templates/show/vpn/ipsec/sa/node.def
@@ -1,3 +1,8 @@
help: Show all active IPsec Security Associations (SA)
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa
- sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa
+
+run: if pgrep charon >&/dev/null; then
+ sudo /usr/sbin/swanctl --list-sas
+ else
+ echo -e "IPSec Process NOT Running\n"
+ fi
+
diff --git a/templates/show/vpn/ipsec/sa/peer/node.def b/templates/show/vpn/ipsec/sa/peer/node.def
deleted file mode 100644
index 7e5e913..0000000
--- a/templates/show/vpn/ipsec/sa/peer/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show all active IPsec Security Associations (SA) for a peer
diff --git a/templates/show/vpn/ipsec/sa/peer/node.tag/node.def b/templates/show/vpn/ipsec/sa/peer/node.tag/node.def
deleted file mode 100644
index 559bed5..0000000
--- a/templates/show/vpn/ipsec/sa/peer/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show all active IPsec Security Associations (SA) for a peer
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-peers-for-cli
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-peer="$6"
diff --git a/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.def
deleted file mode 100644
index 0772ef3..0000000
--- a/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show the active IPsec Security Association (SA) for a peer's tunnel
diff --git a/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def
deleted file mode 100644
index 195f37a..0000000
--- a/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show the active IPsec Security Association (SA) for a peer's tunnel
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[5]}
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-conn $6 $8
diff --git a/templates/show/vpn/ipsec/sa/profile/node.def b/templates/show/vpn/ipsec/sa/profile/node.def
deleted file mode 100644
index a0d7b44..0000000
--- a/templates/show/vpn/ipsec/sa/profile/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show all active IPsec Security Associations (SA) for a profile
diff --git a/templates/show/vpn/ipsec/sa/profile/node.tag/node.def b/templates/show/vpn/ipsec/sa/profile/node.tag/node.def
deleted file mode 100644
index 76e66a5..0000000
--- a/templates/show/vpn/ipsec/sa/profile/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show all active IPsec Security Associations (SA) for a profile
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --get-profiles-for-cli
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-profile="$6"
diff --git a/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.def
deleted file mode 100644
index ca0ec72..0000000
--- a/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show the active IPsec Security Association (SA) for a profiles's tunnel
diff --git a/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def
deleted file mode 100644
index 3f0af98..0000000
--- a/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show the active IPsec Security Association (SA) for a profile's tunnel
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --get-conn-for-cli=${COMP_WORDS[5]}
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-conn $6 $8
diff --git a/templates/show/vpn/ipsec/sa/statistics/node.def b/templates/show/vpn/ipsec/sa/statistics/node.def
deleted file mode 100644
index 84fa4b7..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show statistics of all active tunnels that have IPsec Security Associations (SA)
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-stats
- sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-stats
diff --git a/templates/show/vpn/ipsec/sa/statistics/peer/node.def b/templates/show/vpn/ipsec/sa/statistics/peer/node.def
deleted file mode 100644
index b104a83..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/peer/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show stats for all active IPsec Security Associations (SA) for a peer
diff --git a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def b/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def
deleted file mode 100644
index 758333e..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for all active IPsec Security Associations (SA) for a peer
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-peers-for-cli
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-stats-peer="$7"
diff --git a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.def
deleted file mode 100644
index 561cd42..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show stats for the active IPsec Security Association (SA) for a peer's tunnel
diff --git a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def
deleted file mode 100644
index 1902c22..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for the active IPsec Security Association (SA) for a peer's tunnel
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ipsec-sa-stats-conn $7 $9
diff --git a/templates/show/vpn/ipsec/sa/statistics/profile/node.def b/templates/show/vpn/ipsec/sa/statistics/profile/node.def
deleted file mode 100644
index 7b5e040..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/profile/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show stats for all active IPsec Security Associations (SA) for a profile
diff --git a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def b/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def
deleted file mode 100644
index 9d49f44..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for all active IPsec Security Associations (SA) for a profile
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --get-profiles-for-cli
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-stats-profile="$7"
diff --git a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.def b/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.def
deleted file mode 100644
index 4b131c5..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Show stats for the active IPsec Security Association (SA) for a tunnel bound to profile
diff --git a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def
deleted file mode 100644
index b8aa7dc..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for the active IPsec Security Association (SA) for a tunnel bound to profile
-allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpnprof.pl --show-ipsec-sa-stats-conn $7 $9