Setting Auth-Type to Accept using unlang

tnt at kalik.net tnt at kalik.net
Mon Oct 13 21:53:54 CEST 2008


Yes, you can't change Auth-Type *after* authentication (post-auth
section). Move that to authorize section after pap. Check that Auth-Type
hasn't been set and do those updates.

Ivan Kalik
Kalik Informatika ISP


Dana 13/10/2008, "Abel Alejandro" <aalejandro at gmail.com> piše:

>Hello,
>
>I want freeradius to assign to a specific ippool any invalid user
>(user not found or wrong password) as well as accept it.
>
>I am trying to do the following in post-auth but so far I can get
>freeradius to send the Reply-Message, DNS, etc...
>but it will still send Reject-Access. I am guessing that doing
>Auth-Type := "Accept" is too late in post-auth.
>
>       Post-Auth-Type REJECT {
>                if (!NAS-IP-Address == X.X.X.X) {
>                       update reply {
>                                Reply-Message = "Restricted Access"
>                                MS-Primary-DNS-Server = X.X.X.X
>                                MS-Secondary-DNS-Server = X.X.X.X
>                                RP-Max-Sessions-Per-User = 100
>                       }
>                       update control {
>                                Auth-Type := "Accept"
>                                Pool-Name := "invaliduser_pool"
>                        }
>                        # Get an address from the IP Pool.
>                       invaliduser_pool
>                       sql
>                }
>        }
>
>I am using the latest version of freeradius 2.1.1.
>
>Regards,
>Abel.
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>




More information about the Freeradius-Users mailing list