|
|
| Author |
Message |
speedy
Joined: 23 Jun 2006 Posts: 5
|
Posted: Fri Jun 23, 2006 4:59 am Post subject: Cisco Pix - Authenticated VPN Users |
|
|
Hello,
here is a template for the Cisco Pix firewall, which shows the number of authenticated VPN users.
Unfortunetly I find no way to get the number of authenticated users using snmp.
Because of this I wrote a Perl script, which connects over telnet to the firewall , executes the command "sh unauth" and calculates the number of connected users.
Installation Instructions:
1. extract the file pix-vpn-users.zip and copy pix-vpn-users.pl into <path_cacti>/scripts/pix-vpn-users.pl
2. Import the Template cacti_graph_template_cisco_vpn_active_vpn_users.xml
3. Allow Telnet connection to firewall
4. If you don't need a username for telnet login, delete the input field username from "Data Input Methods" --> "Cisco VPN - Active VPN users" in Cacti Gui.
Regards
Speedy
| Description: |
|
| Filesize: |
17.51 KB |
| Viewed: |
15722 Time(s) |

|
| Description: |
| extract file and copy to /scripts/pix-vpn-users.pl |
|
 Download |
| Filename: |
pix-vpn-users.zip |
| Filesize: |
895 Bytes |
| Downloaded: |
1438 Time(s) |
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_cisco_vpn_active_vpn_users.xml |
| Filesize: |
10.26 KB |
| Downloaded: |
1533 Time(s) |
Last edited by speedy on Tue Jun 27, 2006 2:21 am; edited 3 times in total |
|
| Back to top |
|
 |
RUM
Joined: 22 Jun 2006 Posts: 20
|
Posted: Mon Jun 26, 2006 4:16 am Post subject: |
|
|
Hi Speedy,
Thanks for the Template. It's a nice, useable feature.
I was able to get the graph shown, but there is no data on it. Do you know how it's possible?
Thanks in advance
|
|
| Back to top |
|
 |
speedy
Joined: 23 Jun 2006 Posts: 5
|
Posted: Mon Jun 26, 2006 4:34 am Post subject: |
|
|
Hi,
maybe the perl script isn't executed correctly.
Please check if you are able to execute the script from the command line:
./pix-vpn-users.pl -r <router> -u <username> -p <password> -e <enable password>
You should get the number of connected vpn users.
Regards
speedy
|
|
| Back to top |
|
 |
RUM
Joined: 22 Jun 2006 Posts: 20
|
Posted: Mon Jun 26, 2006 4:57 am Post subject: |
|
|
Hi Speedy,
Thanks for the quick reply. I'm still not sure if it is executing correctly, because maybe I'm running it wrong at the command line. I typed:
C:\cacti2\scripts>pix-vpn-users.pl -r <ipaddress router> -u <> -p <password> -e <enable>
> was unexpected at this time.
Note that the username is null and in cacti I allowed it to have a null value. Also when I write <null> as username or when I write the hostname instead of the IP address of the router, it says that the syntax is incorrect. Can I do it diferently?
Regards
|
|
| Back to top |
|
 |
speedy
Joined: 23 Jun 2006 Posts: 5
|
Posted: Mon Jun 26, 2006 5:46 am Post subject: |
|
|
Hi RUM,
at the moment the script isn't able to handle a blank username. I will change it and post the new version.
|
|
| Back to top |
|
 |
RUM
Joined: 22 Jun 2006 Posts: 20
|
Posted: Mon Jun 26, 2006 5:47 am Post subject: |
|
|
Thanks I will keep an eye on this topic for updates.
Regards
|
|
| Back to top |
|
 |
RUM
Joined: 22 Jun 2006 Posts: 20
|
|
| Back to top |
|
 |
speedy
Joined: 23 Jun 2006 Posts: 5
|
Posted: Mon Jun 26, 2006 7:56 am Post subject: |
|
|
I have updated the scripts. Please delete the username from the Data Input method "Cisco VPN - Active VPN users" if you don't want to use a username for telnet login.
Regards
speedy
|
|
| Back to top |
|
 |
RUM
Joined: 22 Jun 2006 Posts: 20
|
Posted: Mon Jun 26, 2006 9:43 am Post subject: |
|
|
Hi,
Thanks for updating so fast Speedy, well ofcourse, that's why you're called Speedy.
Now, I have one problem left. I looked at the poller when it runs. It doesn't seem to recognize the password of the router, or at least part of the password. It tells me that: &xcvjk (example password), is not recognized as an internal or external command.
Is it possible that it's because of the & character?
Regards
|
|
| Back to top |
|
 |
knobdy Cacti User
Joined: 28 Sep 2005 Posts: 495
|
Posted: Mon Jun 26, 2006 11:19 am Post subject: |
|
|
Hey Speedy, thanks for the template!
I've been desperate to find a way to monitor VPN connections to a couple of PIXen and a couple of 2600 routers. Like you, I haven't found any SNMP/MIB support for VPN monitoring.
Having seen your script, I'm wondering if I might be able to edit it for use with Nagios to verify specific tunnels. If you know how to do this already, please share!
|
|
| Back to top |
|
 |
speedy
Joined: 23 Jun 2006 Posts: 5
|
Posted: Tue Jun 27, 2006 2:33 am Post subject: |
|
|
Hi,
sorry there was a mistake in the new script. Please download the new version.
For the password problem try to put the password into quotes. Normally the chracter & is used for command execution.
There is no problem to use the script to execute other commands. You only have to replace the command in the line "print $handle "sh uauth\n";" and change the section for output handling.
Otherwise take a look at the MRAT Tool:
http://www.serreyn.com/software/mrat/
Regards
speedy
|
|
| Back to top |
|
 |
knobdy Cacti User
Joined: 28 Sep 2005 Posts: 495
|
Posted: Tue Jun 27, 2006 4:15 pm Post subject: |
|
|
| speedy wrote: |
There is no problem to use the script to execute other commands. You only have to replace the command in the line "print $handle "sh uauth\n";" and change the section for output handling. |
No problem for you maybe... I, on the otherhand, will spend a week pouring over the meaning of everything in the output section.
|
|
| Back to top |
|
 |
kharford
Joined: 07 Jul 2005 Posts: 40 Location: Mass, USA
|
Posted: Mon Sep 25, 2006 1:40 pm Post subject: |
|
|
Has anyone wrote a script that uses ssh instead of telnet?
Thanks
|
|
| Back to top |
|
 |
JJX Cacti User
Joined: 06 Oct 2005 Posts: 171
|
Posted: Thu Sep 28, 2006 8:30 am Post subject: |
|
|
| RUM wrote: | Hi,
Thanks for updating so fast Speedy, well ofcourse, that's why you're called Speedy.
Now, I have one problem left. I looked at the poller when it runs. It doesn't seem to recognize the password of the router, or at least part of the password. It tells me that: &xcvjk (example password), is not recognized as an internal or external command.
Is it possible that it's because of the & character?
Regards |
replace & with \&
|
|
| Back to top |
|
 |
egarnel Cacti Pro User
Joined: 21 Nov 2002 Posts: 630 Location: Austin, TX
|
Posted: Tue Oct 24, 2006 8:34 am Post subject: revisting this |
|
|
check out remote-access under the CLI in ver 7.2.1... I believe this may be what you are looking for
per the cli:
| Quote: | remote-access Configure SNMP trap threshold for VPN remote-access
sessions
|
granted, it is for thresholding, at least you can trigger an snmp trap
|
|
| Back to top |
|
 |
|