postauth_query question

Christoffer Dahl Petersen cdp at trynix.dk
Thu May 24 14:26:44 CEST 2007


Hi

I'm trying to log authorization request to a postgres db.
My postauth query:
postauth_query = "INSERT INTO authlog (where, who, reply,authdate)
VALUES ('%{NAS-IP-Address}','%{User-Name}','%{reply:Packet-Type}',
NOW())"


Could I use another attribute rather than NAS-IP-Address that would
translate NAS-IP-Address into the shortname given i clients.conf?

Some info:
radiusd -X
<snip>
rad_recv: Access-Request packet from host 192.168.250.20:6001, id=12,
length=69
        User-Name = "00-15-00-15-23-3f"
        User-Password = "28652865"
        NAS-IP-Address = 192.168.250.20
        NAS-Port = 0
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
  modcall[authorize]: module "preprocess" returns ok for request 0
radius_xlat:  '00-15-00-15-23-3f'
rlm_sql (sql): sql_set_user escaped user --> '00-15-00-15-23-3f'
<snip>


I have enabled "log_auth = yes" in radiusd.conf, and i get this in
radiusd.log:
Thu May 24 11:26:19 2007 : Auth: Login OK:
[00-15-00-15-23-3f/00-15-00-15-23-3f] (from client radiustest port 0)


I would like to log "radiustest" rather than 192.168.250.20 


Christoffer




More information about the Freeradius-Users mailing list