post-proxy ip address assignment

Gabriel Marais rootchaos at gmail.com
Thu May 2 12:33:32 CEST 2013


On Wed, May 1, 2013 at 1:22 PM, <A.L.M.Buxey at lboro.ac.uk> wrote:

> Hi,
>
> >    sorry alan, perhaps I'm mixing up my examples in an attempt to get
> this
> >    working...
>
> run your freeradius is full debug mode. LOOK at what is going on
>
> >    1. where (or in which file) do I add the unlang code?
>
> as you have
>

I have made the changes in  the file proxy-inner-tunnel -- i'm not sure if
this is where i'm supposed to be adding the change.



> >    2. how do i update the reply?
>
> by updating the reply
>
> >    I currently have the following code in my proxy-inner-tunnel file :-
> >    post-proxy {
> >            eap
> >            if (proxy-reply:Access-Accept) {
> >           update proxy-reply { Framed-IP-Address := "%{sql:SELECT Value
> FROM
> >    `radreply` WHERE UserName ='%{User-Name}' AND Attribute =
> >    'Framed-IP-Address'}"  }
>
> thats not updating the reply is it. thats updating the proxy-reply.
>

I changed the proxy-inner-tunnel file with the following :-
post-proxy {
        #
        #  This is necessary for LEAP, or if you set:
        #
        #  proxy_tunneled_request_as_eap = no
        #
        eap

        if (proxy-reply:Acct-Interim-Interval = 900) {
       update reply {
             Framed-IP-Address := "%{sql:SELECT Value FROM `radreply`
        WHERE UserName ='%{User-Name}' AND Attribute = 'Framed-IP-Address'}"
                        }
                                                        }
I am not sure what I should be using for the IF statement as the reply
coming back from the upstream proxy looks  like this :-

rad_recv: Access-Accept packet from host 168.172.64.224 port 1812, id=61,
length=125
        Proxy-State = 0x313634
        Acct-Interim-Interval = 900
        Class =
0xc24109ed0000013700010200a8ac40e040e0000000000000a8ac40e001ce46617c0576420000000000002fcb
        MS-Link-Utilization-Threshold = 50
        MS-Link-Drop-Time-Limit = 120
        MS-MPPE-Encryption-Policy = 0x00000002
        MS-MPPE-Encryption-Types = 0x0000000e

There is no IP Address in the reply, and I need to insert it at this stage
before sending it back to the 3g carrier radius server.




>
> alan
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130502/6327a214/attachment.html>


More information about the Freeradius-Users mailing list