On Sun, Oct 28, 2001 at 07:22:55PM +0200, Sotiris P. Christodoulou wrote:
>I'm developing a web application for ISPs. The users of this application
>will be the dial-in users of the ISP. I need to retrieve the "user-name"
>of the dial-in user by using it's assigned IP (I get it from the HTTP
>protocol when she/he interacts with my application). Do you know where
>this information (in most common ISP configurations and networks) is
>logged/kept?  I want to install a proxy RADIUS server to get this
>information (user-name and the assigned IP-address), but how can I be
>sure that the NAS will always send the assigned IP to the RADIUS server?

I would probably set up a users entry that called radwho through the
``Exec-Program-Wait'' function, having that program parse the output of
radwho to send the output back with Reply-Message.

DEFAULT Client-IP-Address == webserver, Password == "somethingspecial"

Exec-Program-Wait = "parseprog %u",

Fall-Through = no

Now if the webserver send a request with User set to its client's IP
address and the password somethingspecial, I think it would then pass the
client's IP address to parseprog through the %u option.  The parseprog
might be something like this:

#!/bin/sh
userip=$1
username=`radwho | awk '$NF ~ /^'$userip'$/{print $1; exit}'`
echo "Reply-Message += \"$username\""
# return non-zero which will treat as a login fail
exit 1;

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation.
                -- Johnny Hart

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to