diff options
Diffstat (limited to 'templates/show/vpn')
4 files changed, 31 insertions, 0 deletions
diff --git a/templates/show/vpn/debug/peer/node.def b/templates/show/vpn/debug/peer/node.def new file mode 100644 index 0000000..deb1033 --- /dev/null +++ b/templates/show/vpn/debug/peer/node.def @@ -0,0 +1 @@ +help: Show debugging information for a peer diff --git a/templates/show/vpn/debug/peer/node.tag/node.def b/templates/show/vpn/debug/peer/node.tag/node.def new file mode 100644 index 0000000..a27063a --- /dev/null +++ b/templates/show/vpn/debug/peer/node.tag/node.def @@ -0,0 +1,14 @@ +help: Show debugging information for a peer +allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-peers-for-cli +run: if [ -n "$(cli-shell-api returnActiveValues \ + vpn ipsec ipsec-interfaces interface)" ]; then + if pgrep pluto > /dev/null + then + /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug | grep peer-$5 + else + echo IPsec process not running + fi + else + echo VPN ipsec not configured + fi + diff --git a/templates/show/vpn/debug/peer/node.tag/tunnel/node.def b/templates/show/vpn/debug/peer/node.tag/tunnel/node.def new file mode 100644 index 0000000..3b2f196 --- /dev/null +++ b/templates/show/vpn/debug/peer/node.tag/tunnel/node.def @@ -0,0 +1,2 @@ +help: Show debugging information for a peer's tunnel + diff --git a/templates/show/vpn/debug/peer/node.tag/tunnel/node.tag/node.def b/templates/show/vpn/debug/peer/node.tag/tunnel/node.tag/node.def new file mode 100644 index 0000000..c141ac0 --- /dev/null +++ b/templates/show/vpn/debug/peer/node.tag/tunnel/node.tag/node.def @@ -0,0 +1,14 @@ +help: Show debugging information for a peer's tunnel +allowed: /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[4]} +run: if [ -n "$(cli-shell-api returnActiveValues \ + vpn ipsec ipsec-interfaces interface)" ]; then + if pgrep pluto > /dev/null + then + /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug | grep "peer-$5-tunnel-$7" + else + echo IPsec process not running + fi + else + echo VPN ipsec not configured + fi + |