Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

is it possible to have an OR statement in freeradius check attributes?

I have say 10 VPN servers that authenticate from freeradius. Most users can access all servers but I have a demo user that can only access 2 of those servers.

I can set this up so that the demo can only access 1 of the servers by putting the following in the radcheck table/users file

NAS-IP-Address==xxx.xxx.xxx.1

But I need to have and OR statement in there like:

NAS-IP-Address==xxx.xxx.xxx.1 OR xxx.xxx.xxx.2

Is this possible in freeradius?

share|improve this question
1  
You could have a fallthrough I think.. –  NickW May 30 '13 at 16:16

1 Answer 1

up vote 1 down vote accepted

You can use the =~ operator, and a regex xxx.xxx.xxx.1|xxx.xxx.xxx.2

Reference: http://freeradius.1045715.n5.nabble.com/Logical-OR-with-Check-Attributes-td3265998.html

share|improve this answer
    
you sir are a star! –  user1167223 May 30 '13 at 16:22
    
Nah, just someone with freeradius experience, and a knack with google :) –  NickW May 30 '13 at 16:25
    
@user1167223 remember to mark it as resolved.. :) –  NickW May 30 '13 at 16:41
    
done, couldnt do it before, it insisted I waited 10 mins and I had to go out :) –  user1167223 May 30 '13 at 20:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.