Hello, In my radius server (Ver. 2.2.0), i would like to delete one attributte from the access-accept if a condition is met. The condition would be: If the access-accept packet contains a "Framed-IP-Address" and a "l" attributte, DELETE the "Framed-IP-Address". I was trying to write into "Authorize" section the following statement: if (&Framed-IP_Address !* ANY) && (&Framed-Pool !* ANY) { update reply { Framed-IP-Address -= * } } But doesn´t seems to work If its neccesary i will replicate the configuration on another server for can put here the radius -X output.. Can someone help me with this code lines? Best regards, Juanjo. Sent with Stampery <https://stampery.com/gmail>
On Mon, May 23, 2016 at 05:42:57PM +0200, Juanjo Abenza wrote:
update reply { Framed-IP-Address -= * }
Can someone help me with this code lines?
update reply { Framed-IP-Address !* ANY } Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
Hi,
In my radius server (Ver. 2.2.0), i would like to delete one attributte from the access-accept if a condition is met.
okay..so delete something from access-accept....access accept from your server or from another server?
The condition would be: If the access-accept packet contains a "Framed-IP-Address" and a "l" attributte, DELETE the "Framed-IP-Address".
I was trying to write into "Authorize" section the following statement:
authorize likely to be in wrong place - post-auth or post-proxy likely to be more suited if (condition where framed-ip-address exists and other attribute has that value in it) { update reply { Framed-IP-Address !* ANY } } that !* blats values - you'll find it elsehwre in the native/default coinfig and also in man pages for unlang etc. alan
It's from my server, the problem is that i set a user with a sql_ippool and when i put the user in another group, it add the attributte "Framed-Pool" wich i want my NAS to use, but somewhere i read that NASes gives priority to use the "Framed-IP-Address" before the "Framed-Pool" attributte. I'm now trying the next statement under post-auth, but after a few tries i couldn't find what is my error in the condition. when i achieve this i will do regex, but for now im trying with String. *Post-Auth section* if ( &Framed-Pool == "cortados" ) { } else { sqlippool } *OUTPUT:* *+- entering group post-auth {...}* *Exec-Program output: Mikrotik-Rate-Limit="1024/1024",Framed-Pool="cortados",* *Exec-Program-Wait: value-pairs: Mikrotik-Rate-Limit="1024/1024",Framed-Pool="cortados"* *Exec-Program: returned: 0* *++[exec] returns ok* *++? if (&Framed-Pool == "cortados" )* *? Evaluating (&Framed-Pool == "cortados" ) -> FALSE* *++? if (&Framed-Pool == "cortados" ) -> FALSE* *++- entering else else {...}* *rlm_sql (sql): Reserving sql socket id: 3* I think it should return a TRUE Best regards, Juanjo. Sent with Stampery <https://stampery.com/gmail> 2016-05-23 21:54 GMT+02:00 <A.L.M.Buxey@lboro.ac.uk>:
Hi,
In my radius server (Ver. 2.2.0), i would like to delete one attributte from the access-accept if a condition is met.
okay..so delete something from access-accept....access accept from your server or from another server?
The condition would be: If the access-accept packet contains a "Framed-IP-Address" and a "l" attributte, DELETE the "Framed-IP-Address".
I was trying to write into "Authorize" section the following statement:
authorize likely to be in wrong place - post-auth or post-proxy likely to be more suited
if (condition where framed-ip-address exists and other attribute has that value in it) { update reply { Framed-IP-Address !* ANY } }
that !* blats values - you'll find it elsehwre in the native/default coinfig and also in man pages for unlang etc.
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sent with Stampery <https://stampery.com/gmail>
On May 27, 2016, at 7:27 AM, Juanjo Abenza <juanjo@excom.es> wrote:
It's from my server, the problem is that i set a user with a sql_ippool and when i put the user in another group, it add the attributte "Framed-Pool" wich i want my NAS to use, but somewhere i read that NASes gives priority to use the "Framed-IP-Address" before the "Framed-Pool" attributte.
I'm now trying the next statement under post-auth, but after a few tries i couldn't find what is my error in the condition. when i achieve this i will do regex, but for now im trying with String.
*Post-Auth section*
if ( &Framed-Pool == "cortados" ) {
Is the Framed-Pool attribute in the request list? I suspect it's in the reply. You will need to do: if ( &reply:Framed-Pool == "cortados" ) {
I think it should return a TRUE
No. Read "man unlang". Alan DeKok.
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Juanjo Abenza -
Matthew Newton