[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Openvpn simple tracking script


  • Subject: Re: [Openvpn-users] Openvpn simple tracking script
  • From: dassey@xxxxxxxxx
  • Date: Tue, 10 Apr 2007 09:06:41 -0700

Your da man Erich, thanks. With the given info i was able to look at the tech needed to build some pretty simplistic scripts. here is the ones i am using:

(client-disconnect)
#!/bin/bash

echo Sent=${bytes_sent} $'\n'Received=${bytes_received} $'\n'Duration=${time_duration} >> /etc/openvpn/scripts/${common_name}

(client-connect)
#!/bin/bash

touch /etc/openvpn/scripts/${common_name}
chmod 777 /etc/openvpn/scripts/${common_name}
echo Connected=${time_ascii} >> /etc/openvpn/scripts/${common_name}

Ill get better scripts as i finish reading the shell scripting book i downloaded ;)

If anyone happens to know why ${time_ascii} and ${time_duration} are not echoing to the file, let me know...not needed, but useful

Thanks again Erich

On 4/9/07, Erich Titl <erich.titl@xxxxxxxx> wrote:
Hi

ournixnation@xxxxxxxxx wrote:
> Thanks for your help, Erich!
>
> I was just wondering what to do with the two blocks of code that you
> gave. Do I put those is a file(s)? If so, what file(s)? Also, do I have
> to reference that file(s) in the openvpn server conf? Finally, Where
> will this log appear?

Those are connect/disconnect scripts that you can place, for example, in
a scripts directory, let's say /etc/openvpn/scripts (don't forget to
make them executable)

You make those scripts available to openvpn with the client-connect and
client-disconnect directive in the server config file. The logs are the
written to wherever your syslog config file sends the (in this instance)
local3 logs, either local or remote.

If you need more info contact me off list, as this then becomes OT

cheers

Erich

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users