Hi All I have the following in the users and acct_users files DEFAULT Called-Station-Id == "0198334115", Proxy-To-Realm := "xxxx.com" I would like to match on "198334115" with a possibility of about 4 to 6 more number on the front of this number. I have tried a number of difference regx's but non of them have worked so I must have something wrong :) Any ideas would be great. Thanks Mike
"Mike O'Connor" <freeradius@pineview.net> wrote:
I have tried a number of difference regx's but non of them have worked so I must have something wrong :)
The O'Reilly book helps a lot. Reading the "man" page for the "users" file would help, too. You're not doing regular expression matching at all. DEFAULT Called-Station-Id =~ "198334115$", Proxy-To-Realm := "xxxx.com" Alan DeKok.
Thanks Alan
Reading the "man" page for the "users" file would help, too. You're not doing regular expression matching at all.
DEFAULT Called-Station-Id =~ "198334115$", Proxy-To-Realm := "xxxx.com"
I did not give any examples of what I had tried which I suppose I should have. Below are some of my attempts #DEFAULT Called-Station-Id == "198407112$", Proxy-To-Realm := "xxxx.au" #DEFAULT Called-Station-Id == "*128407112$", Proxy-To-Realm := "xxxx.au" #DEFAULT Called-Station-Id == "^[0-9]*128407112$", Proxy-To-Realm := "xxxx.au" None of the above worked, even though the exact number did. Cheers Mike
Yes, but you missed one important little detail... use =~ not == and as Alan suggested, read the man page where you'll find all sorts of usefull information like: Attribute =~ Expression As a check item, it matches if the request contains an attribute which matches the given regular expression. This operator may only be applied to string attributes. Not allowed as a reply item. :) cheers, Mike
Thanks Alan
Reading the "man" page for the "users" file would help, too. You're not doing regular expression matching at all.
DEFAULT Called-Station-Id =~ "198334115$", Proxy-To-Realm := "xxxx.com"
participants (3)
-
Alan DeKok -
Mike Mitchell -
Mike O'Connor