Setting different IDLE-TIMEOUTS based on IP Address

Matthew Newton mcn4 at leicester.ac.uk
Wed Apr 17 00:01:32 CEST 2013


On Tue, Apr 16, 2013 at 10:39:18PM +0100, A.L.M.Buxey at lboro.ac.uk wrote:
> >    client 10.3.99.0/24 {
> >            secret          = XXXXXX
> >            shortname       = SNJ 7000 Switches
> >    }
> 
> I'd use "%{client:shortname}" eg
> 
> if ("%{client:shortname}" == "MSP 7345's") {
> 	update reply {
> 		Idle-Timeout = 1800
> 	}
> }
> 
> 
> yes. you can do that sort of thing. :-)

Actually, taking that one step further... make up a new value in
the clients.conf file:

client 10.3.99.0/24 {
  secret = XXX
  shortname = My switches
  myidlevalue = 600
}
...

then just do this in authorize:

update reply {
  Idle-Timeout := "%{client:myidlevalue}"
}

(may want an if{} around it if myidlevalue isn't defined for all
clients)

:)

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at 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 at le.ac.uk>


More information about the Freeradius-Users mailing list