Setting different IDLE-TIMEOUTS based on IP Address

John Giordano john.giordano at
Tue Apr 16 21:05:45 CEST 2013



So I man’ed unlang and then did some more reading on huntgroups and the users file.  If at all possible I think we would opt for a combo of the huntgroups/users file approach.  I am still not clear as to how we would do this though….

Could you please speak to the interrelationship between the clients file and the huntgroups file?

For examples this is what we have in our clients config file now (with our internal IP’s changed for obfuscation’s sake):

client {
        secret          =    XXXXXXX
        shortname       = MSP 7345’s

client {
        secret          = XXXXXX
        shortname       = SNJ 7000 Switches

These are the two different equipment types we would like to have different IDLE-TIMEOUTs for.

My first question is that every huntgroups file example I have seen on the Net uses a per NAS definition:

raleigh        NAS-IP-Address ==
raleigh        NAS-IP-Address ==
raleigh        NAS-IP-Address ==
premium        NAS-IP-Address ==, NAS-Port-Id == 0-4
               Group = premium,
               Group = staff

I would rather not have to define 254 different entries in our huntgroups file (254 hosts in a Class C obviously).  Can I use a netmask somehow in the huntgroups file?

In pseudo parlance this is what I am trying to accomplish in huntgroups:

MSP 7345’s NAS-IP-Address ==
                IDLE-TIMEOUT = 1800

SNJ 7000 NAS-IP-Address ==
                IDLE-TIMEOUT = 60



From: Alan Buxey [mailto:A.L.M.Buxey at]
Sent: Tuesday, April 16, 2013 10:45 AM
To: John Giordano; freeradius-users at
Subject: Re: Setting different IDLE-TIMEOUTS based on IP Address

If your NAS can take such a value then it can be assigned. Either via eg users file and huntgroup or via eg unlang

if(%{NAS-Ip-Address} == "") {
 update reply {
  Attribute = XYZ

..'man unlang' for more info

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list