diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-12-10 17:19:18 -0800 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-01-12 16:43:37 -0800 |
commit | 04cb338f62c4e6a8ebd062a524cd2c1c6a3489f4 (patch) | |
tree | e8b7a417a86f2a52ceed757bf6620a1fb03067ce /templates | |
parent | 03f361bac3eb20554b7487d4b4b6a56cbeae62a2 (diff) | |
download | vyatta-op-vpn-04cb338f62c4e6a8ebd062a524cd2c1c6a3489f4.tar.gz vyatta-op-vpn-04cb338f62c4e6a8ebd062a524cd2c1c6a3489f4.zip |
fix show vpn commands to work with strongswan
(cherry picked from commit 32927e013922e1a79b0f214773e2500a1260871a)
Diffstat (limited to 'templates')
5 files changed, 10 insertions, 2 deletions
diff --git a/templates/show/vpn/ike/sa/peer/node.tag/node.def b/templates/show/vpn/ike/sa/peer/node.tag/node.def index dae4fae..358d898 100644 --- a/templates/show/vpn/ike/sa/peer/node.tag/node.def +++ b/templates/show/vpn/ike/sa/peer/node.tag/node.def @@ -1,2 +1,3 @@ help: Show all currently active IKE Security Associations (SA) for a specific peer +allowed: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=get-all-peers run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ike_sa.xsl --pname peer --pval "$6" diff --git a/templates/show/vpn/ipsec/sa/detail/connection/node.tag/node.def b/templates/show/vpn/ipsec/sa/detail/connection/node.tag/node.def index 2f7c8f3..c38a84c 100644 --- a/templates/show/vpn/ipsec/sa/detail/connection/node.tag/node.def +++ b/templates/show/vpn/ipsec/sa/detail/connection/node.tag/node.def @@ -2,4 +2,4 @@ help: Show detailed all active IPsec Security Associations (SA) for a specific c run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_sa.xsl --pname detail --pval y --pname conn --pval "$7" -allowed: sudo /usr/sbin/ipsec auto --status | grep '000 "peer-' | perl -p -e 's/^000 "([^"]*)":\s.*/\1/' | sort -u +allowed: sudo /usr/sbin/ipsec status | grep '000 "peer-' | perl -p -e 's/^000 "([^"]*)":\s.*/\1/' | sort -u 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 index 6bc7dbb..6e43c91 100644 --- a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def +++ b/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def @@ -1,2 +1,3 @@ help: Show detailed all active IPsec Security Associations (SA) for a specific peer +allowed: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=get-all-peers run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_sa.xsl --pname detail --pval y --pname peer --pval "$7" diff --git a/templates/show/vpn/ipsec/sa/peer/node.tag/node.def b/templates/show/vpn/ipsec/sa/peer/node.tag/node.def index bee0b0d..210c40a 100644 --- a/templates/show/vpn/ipsec/sa/peer/node.tag/node.def +++ b/templates/show/vpn/ipsec/sa/peer/node.tag/node.def @@ -1,2 +1,3 @@ help: Show all active IPsec Security Associations (SA) for a specific peer +allowed: /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=get-all-peers run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_sa.xsl --pname peer --pval "$6" diff --git a/templates/show/vpn/ipsec/status/node.def b/templates/show/vpn/ipsec/status/node.def index ac82328..4611fdd 100644 --- a/templates/show/vpn/ipsec/status/node.def +++ b/templates/show/vpn/ipsec/status/node.def @@ -1,2 +1,7 @@ help: Show status of IPsec process -run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_status.xsl +run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_status.xsl + if pgrep pluto >&/dev/null; then + active_tunnels=`ipsec status 2> /dev/null | grep -i "ipsec sa established" | wc -l | sed s/\ //g` + echo "$active_tunnels Active IPsec Tunnels" + echo + fi |