radiusplugin-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Radiusplugin-users] vsascript.pl produce same action result, both


From: chowalit.lab Chowalit Lab Linux
Subject: Re: [Radiusplugin-users] vsascript.pl produce same action result, both of client connect and client disconnect.
Date: Sun, 3 May 2009 20:03:14 +0700

Hi,
    Thanks you for your help.

Chong

On Sun, May 3, 2009 at 5:53 PM, Ralf Lübben <address@hidden> wrote:
> Hi,
>
> the action in C++-code was wrong.
>
> Please try
>
> http://www.nongnu.org/radiusplugin/radiusplugin_v2.1_beta4.tar.gz
>
> Ralf
>
>
> Am Samstag, 2. Mai 2009 16:28:23 schrieb chowalit.lab Chowalit Lab Linux:
>> Dear all,
>>       I modify vsascript.pl to keep "print" result to file. Sample of
>> modified vsascript.pl was here.
>> ...
>> open(FIFO, "< $pipe") || print "fifo: $!\n";
>> open (WFILEHANDLE, ">>/tmp/vsa.log") or die ("Cannot open vsa.log .\n");
>> # keep log into /tmp/vsa.log
>> my $l;
>> ...
>> read (FIFO,$l,4);
>> $action=unpack('N1',$l);
>> # Keep every print function into /tmp/vsa.log
>> print WFILEHANDLE "VSAScript: Action: $action\n";
>>
>> read (FIFO,$l,4);
>> $reykeying=unpack('N1',$l);
>> # Keep every print function into /tmp/vsa.log
>> print WFILEHANDLE "VSAScript: Rekeying: $action\n";
>> ....
>>
>>
>>
>>    In /etc/openvpn/server.cnf was contain.
>>
>> ...
>> plugin  /usr/share/openvpn/plugin/lib/radiusplugin.so
>> /etc/openvpn/radiusplugin.cnf
>> ....
>>
>>
>>     In /etc/openvpn/radiusplugin.cnf was contain.
>>
>> ...
>> # Path to a script for vendor specific attributes.
>> # Leave it out if you don't use an own script.
>> vsascript=/etc/openvpn/vsascript.pl
>>
>> # Path to the pipe for communication with the vsascript.
>> # Leave it out if you don't use an own script.
>> vsanamedpipe=/tmp/vsapipe
>> ....
>>
>>              After I restart openvpn service and test openvpn
>> connection from client. This is vsa.log detail.
>>
>>
>> VSAScript: Action: 1
>> VSAScript: Rekeying: 1
>> VSAScript: buflen: 80
>> VSAScript: Attribute Number : 101
>> VSAScript: Attribute Length : 1
>> VSAScript: Attribute Value : p
>> VSAScript: Attribute Number : 102
>> VSAScript: Attribute Length : 1
>> VSAScript: Attribute Value : p
>> VSAScript: Attribute Number : 103
>> VSAScript: Attribute Length : 8
>> VSAScript: Attribute Value : 10.1.2.2
>> VSAScript: Attribute Number : 104
>> VSAScript: Attribute Length : 14
>> VSAScript: Attribute Value : 192.168.81.102
>> VSAScript: Attribute Number : 105
>> VSAScript: Attribute Length : 4
>> VSAScript: Attribute Value : 1575
>>
>> ---------------VSAScript----------------------
>>
>> Action: Client connect
>> Reykeying: No
>> Username: p
>> Commonname: p
>> Callingstationid: 192.168.81.102
>> Untrustedport: 1575
>> FramedIP: 10.1.2.2
>> ---------------VSAScript----------------------
>>
>>               Then I disconnect openvpn. The result of vsa.log after
>> disconnect.
>>
>>
>> VSAScript: Action: 1
>> VSAScript: Rekeying: 1
>> VSAScript: buflen: 80
>> VSAScript: Attribute Number : 101
>> VSAScript: Attribute Length : 1
>> VSAScript: Attribute Value : p
>> VSAScript: Attribute Number : 102
>> VSAScript: Attribute Length : 1
>> VSAScript: Attribute Value : p
>> VSAScript: Attribute Number : 103
>> VSAScript: Attribute Length : 8
>> VSAScript: Attribute Value : 10.1.2.2
>> VSAScript: Attribute Number : 104
>> VSAScript: Attribute Length : 14
>> VSAScript: Attribute Value : 192.168.81.102
>> VSAScript: Attribute Number : 105
>> VSAScript: Attribute Length : 4
>> VSAScript: Attribute Value : 1575
>>
>> ---------------VSAScript----------------------
>>
>> Action: Client connect
>> Reykeying: No
>> Username: p
>> Commonname: p
>> Callingstationid: 192.168.81.102
>> Untrustedport: 1575
>> FramedIP: 10.1.2.2
>> ---------------VSAScript----------------------
>>
>>
>>     Both of result show the same result. As I found the problem is
>> vsascript return same action. It show only Client Connect action.
>>
>> The same result:
>> VSAScript: Action: 1
>> Action: Client connect
>>
>>
>>     I want to use vsascript.pl to run after client-connect and
>> client-disconnect action. Am I miss something in coding. Please help
>> me.
>>
>>
>> Thanks
>> Chong
>>
>>
>> _______________________________________________
>> Radiusplugin-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/radiusplugin-users
>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]