Is it possible to use wild card domains in proxy.conf? Or does regex support have to be enabled somewhere or can it be enabled? regards, Joseph
Joseph wrote:
Is it possible to use wild card domains in proxy.conf?
No. But you can write regexes in the "users" file: DEFAULT User-Name =~ "(([a-zA-Z]+\.)*foo.com", Proxy-To-Realm := "foo.com" Will cause the following to be proxied to "foo.com": user@foo.com user@bar.foo.com user@bx.y.foo.com ... Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
Alan DeKok wrote:
Joseph wrote:
Is it possible to use wild card domains in proxy.conf?
No. But you can write regexes in the "users" file:
DEFAULT User-Name =~ "(([a-zA-Z]+\.)*foo.com", Proxy-To-Realm := "foo.com"
Will cause the following to be proxied to "foo.com":
user@foo.com user@bar.foo.com user@bx.y.foo.com ...
I see, that helps. What about proxying the accounting records for this wild card domain? regards, Joseph
Joseph wrote:
What about proxying the accounting records for this wild card domain?
See the "acct_users" file. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
It's a check item, so radcheck. Ivan Kalik Kalik Informatika ISP Dana 7/5/2007, "Santiago Balaguer García" <santiagoawa@hotmail.com> piše:
DEFAULT User-Name =~ "(([a-zA-Z]+\.)*foo.com", Proxy-To-Realm := "foo.com">> Will cause the following to be proxied to "foo.com":>> user@foo.com> user@bar.foo.com> user@bx.y.foo.com> ... How can I integrate this entry of user file in a DB? Must I put this entries in radcheck table or in radreply table?Encuentra una aventura, un romance o al amor de tu vida. Date de alta gratis.
Hi to list, I've read the thread for "Proxy.conf regex". I'd like to setup a proxy based on Nas-Ip-Address. I've tried two solutions: 1) add to users file (please note that 255.255.255.255 is done by radtest, and realm test.com is configured in proxy.conf) DEFAULT NAS-IP-Address == 255.255.255.255 Proxy-To-Realm = "test.com" 2) add to users file DEFAULT Huntgroup-Name == "test" Proxy-To-Realm = "test.com" And to huntgroups file test NAS-IP-Address == 255.255.255.255 Without success. All logins are tested locally. My radiusd.conf reports: proxy_requests = yes $INCLUDE ${confdir}/proxy.conf ... files { usersfile = ${confdir}/users } preprocess { huntgroups = ${confdir}/huntgroups } ... authorize { preprocess ... files } preacct { preprocess ... files } Any clue? Thank you
-----Original Message----- From: freeradius-users-bounces+is=gentestrana.net@lists.freeradius.o rg [mailto:freeradius-users-bounces+is=gentestrana.net@lists.free radius.org] On Behalf Of Joseph Sent: Friday, May 04, 2007 10:38 PM To: FreeRadius users mailing list Subject: Proxy.conf regex
Is it possible to use wild card domains in proxy.conf?
Or does regex support have to be enabled somewhere or can it be enabled?
regards, Joseph - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.5/792 - Release Date: 06/05/2007 21.01
Andrea Cerrito wrote:
1) add to users file (please note that 255.255.255.255 is done by radtest, and realm test.com is configured in proxy.conf) DEFAULT NAS-IP-Address == 255.255.255.255 Proxy-To-Realm = "test.com"
The "Proxy-To-Realm" attribute belongs on the first line, along with the NAS-IP-Address attribute. The examples posted on the list are like that. If you run the server in debugging mode it will print out a WARNING message saying so. And reading "man users" will tell you which attributes belong where. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
Solved, thank you. For many NAS, the NAS-Ip-Address can be checked this way? DEFAULT NAS-Ip-Address =~ "1.2.3.", Proxy-To-Real = "test.com" To match all network 1.2.3.0? I mean, can I check the ip address for the NAS as a regexp? Thank you
-----Original Message----- From: freeradius-users-bounces+is=gentestrana.net@lists.freeradius.o rg [mailto:freeradius-users-bounces+is=gentestrana.net@lists.free radius.org] On Behalf Of Alan DeKok Sent: Monday, May 07, 2007 2:13 PM To: FreeRadius users mailing list Subject: Re: Proxying by Nas-Ip-Address (was Proxy.conf regex )
Andrea Cerrito wrote:
1) add to users file (please note that 255.255.255.255 is done by radtest, and realm test.com is configured in proxy.conf) DEFAULT NAS-IP-Address == 255.255.255.255 Proxy-To-Realm = "test.com"
The "Proxy-To-Realm" attribute belongs on the first line, along with the NAS-IP-Address attribute. The examples posted on the list are like that. If you run the server in debugging mode it will print out a WARNING message saying so. And reading "man users" will tell you which attributes belong where.
Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.5/792 - Release Date: 06/05/2007 21.01
Andrea Cerrito wrote:
Solved, thank you. For many NAS, the NAS-Ip-Address can be checked this way?
DEFAULT NAS-Ip-Address =~ "1.2.3.", Proxy-To-Real = "test.com"
To match all network 1.2.3.0? I mean, can I check the ip address for the NAS as a regexp?
Thank you
DEFAULT NAS-Ip-Address =~ "^1\.2\.3\.", Proxy-To-Realm := "test.com" Proxy-To-Realm should be added as a check item, else it won't work...
Arran Cudbard-Bell wrote:
Andrea Cerrito wrote:
Solved, thank you. For many NAS, the NAS-Ip-Address can be checked this way?
DEFAULT NAS-Ip-Address =~ "1.2.3.", Proxy-To-Real = "test.com"
To match all network 1.2.3.0? I mean, can I check the ip address for the NAS as a regexp?
Thank you
DEFAULT NAS-Ip-Address =~ "^1\.2\.3\.", Proxy-To-Realm := "test.com"
Proxy-To-Realm should be added as a check item, else it won't work...
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Really you should be using huntgroups to define ranges of NAS's anyway. See the examples in the huntgroups file, and use Huntgroup-Name == "myhuntgroup", Proxy-To-Realm := "test.com" I can't remember if regexp only works for strings , I know it doesn't work for integer attributes, not sure about ipaddr attributes.
On Monday 07 May 2007 07:45:36 Andrea Cerrito wrote:
Hi to list,
I've read the thread for "Proxy.conf regex". I'd like to setup a proxy based on Nas-Ip-Address.
I've tried two solutions:
1) add to users file (please note that 255.255.255.255 is done by radtest, and realm test.com is configured in proxy.conf) DEFAULT NAS-IP-Address == 255.255.255.255 Proxy-To-Realm = "test.com"
2) add to users file DEFAULT Huntgroup-Name == "test" Proxy-To-Realm = "test.com"
And to huntgroups file test NAS-IP-Address == 255.255.255.255
Without success. All logins are tested locally.
Any clue? Thank you
Read what several others have posted to this thread. Proxy-To-Realm is a _check_ item. Make Proxy-To-Realm a check item and both of your solutions should work as expected. Kevin Bonner
Hi again, Thanks for the help, the proxy is working fine now. Now I've another issue: I've to modify the reply items JUST for a Nas, not for the realm. I mean: NAS1 NAS2 | | \---proxy--/ | +---- Customer Radius | +---- My Radius The Proxy is working for realms A e B: My Radius is realm A, meanwhile customer one is for realm B. The problem is that I've to modify on the proxy the reply items JUST for realm B when called by NAS1. I've read the attr-rewrite, but I don't understand how to force to be called only in such this case. Any help? Thanks Andrea No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.5/792 - Release Date: 06/05/2007 21.01
participants (7)
-
Alan DeKok -
Andrea Cerrito -
Arran Cudbard-Bell -
Joseph -
Kevin Bonner -
Santiago Balaguer García -
tnt@kalik.co.yu