RE: Translate characters

2012-05-08 Thread Xbert_badstuber
Now everything works just fine! I guess i had some missunderstanding with REGEX. After a long time reading it finaly works precisely as i want. Thanks for your answers! Regards your friend, Badstuber Stubblebine. -- View this message in context: http://freeradius.1045715.n5.nabble.com/Translate

Re: Translate characters

2012-05-07 Thread Alan DeKok
Xbert_badstuber wrote: > Now it works, I can change the attribute to a static value. Uh... no. The attribute can use the results of the regex. See "man unlang". > Unfortunately now > I wasn't all clear in my first topic. > My question is if there is any solution for the characters to be chan

RE: Translate characters

2012-05-07 Thread Alan Buxey
its REGEX - you can do whatever you want with the right search/replace functions. I would advise that you do some reading up of REGEX - plenty of free resources on the web and a few good books from the usual publishers. alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/u

Re: Translate characters

2012-05-07 Thread Xbert_badstuber
Now it works, I can change the attribute to a static value. Unfortunately now I wasn't all clear in my first topic. My question is if there is any solution for the characters to be changed, just characters, not the nummbers (value). In our senario we have many differents clients and they are ac

Re: Translate characters

2012-05-07 Thread Alan DeKok
Xbert_badstuber wrote: > Error: Consecutive conditions at (.)/(.):(.*)$/) It's a regex error. > if (NAS-Port-Id =~ /^(.)/(.)/(.):(.*)$/) { /foo/bar/baz is wrong You need something like: /^(.)\/(.)\/(.):(.*)$/ i.e. escape the internal '/' characters. Alan DeKok. - List inf

Re: Translate characters

2012-05-07 Thread Xbert_badstuber
I followed your advice by configure both the files, default and inner tunnel. Unfortunally, a fail comes with a restart of the service. This is what the log tells us: Error: Consecutive conditions at (.)/(.):(.*)$/) Error: /etc/freeradius/sites-enabled/inner-tunnel[47]: Errors parsing authorize se

Re: Translate characters

2012-05-07 Thread Fajar A. Nugraha
On Mon, May 7, 2012 at 4:52 PM, Xbert_badstuber wrote: > Thanks Alan for the quick and helpful answer. > I have just one problem now, in which .conf file should I write/place the > regex? I have tried some files, but none of them have change the Nas-port-id > value. I have try to place it in modul

Re: Translate characters

2012-05-07 Thread Xbert_badstuber
Thanks Alan for the quick and helpful answer. I have just one problem now, in which .conf file should I write/place the regex? I have tried some files, but none of them have change the Nas-port-id value. I have try to place it in modules --> attr_rewrite, proxy.conf, sites-available --> default.

Re: Translate characters

2012-05-04 Thread Alan DeKok
Xbert_badstuber wrote: > Is there anything I can do in the freeradius to change the characters to > different ones? Example: To make “/” as “-“ and “:” as “_”. So the > NAS-Port-ID would look like “1-1-4_1001.129” instead. Is it possible to > translate characters in Freeradius? If possible, how do