Re: rlm_sqlippool Question
HI One more question (sorry) With each accounts call I am calling the sqlippool module. This is wasteful as most sessions on the server *currently* are not from an IP pool. The connections that are in the pool all have Framed-IPs which are '172.x' I have added ... if (Framed-IP-Address =~ /172\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/) { sqlippool } Which seems to work and I am now only seeing the sqlippool calls when the IP is that match... Now my knowledge of regex is not the greatest - so I would really appreciate someone here taking a quick look and saying if that looks correct Thanks in advance Richard On Saturday 06/04/2019 at 11:39 pm, Richard J Palmer wrote:
Hi Alan
That fixes it - thank you as ever for your help
It is appreciated
Richard
--- Original message --- Subject: Re: rlm_sqlippool Question From: Alan DeKok <aland@deployingradius.com> To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Date: Saturday, 06/04/2019 10:53 PM
On Apr 6, 2019, at 5:40 PM, Richard J Palmer <richard@merula.net> wrote:
Going back more (sorry I am talking to myself .....
The config works file with 3.0.15 BUT breaks with that error with 3.0.16 onwards
Use the v3.0.x branch from GitHub. It has a fix. We're releasing 3.0.19 next week.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Sun, 2019-04-07 at 21:36 +0100, Richard J Palmer wrote:
if (Framed-IP-Address =~ /172\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/) { sqlippool } Which seems to work and I am now only seeing the sqlippool calls when the IP is that match...
Now my knowledge of regex is not the greatest - so I would really appreciate someone here taking a quick look and saying if that looks correct
Looks fine - or just /^172\./ To match "172." at the start. -- Matthew
On Apr 7, 2019, at 4:36 PM, Richard J Palmer <richard@merula.net> wrote:
With each accounts call I am calling the sqlippool module. This is wasteful as most sessions on the server *currently* are not from an IP pool.
The connections that are in the pool all have Framed-IPs which are '172.x'
I have added ...
if (Framed-IP-Address =~ /172\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/) { sqlippool } Which seems to work and I am now only seeing the sqlippool calls when the IP is that match...
Now my knowledge of regex is not the greatest - so I would really appreciate someone here taking a quick look and saying if that looks correct
$ man unlang The operators "<", "<=", ">", and ">=" are also allowed for checking that an IP address is contained within a network. For example: if (<ipaddr>192.0.2.1 < 192.0.2.0/24) { This comparison succeeds, because the address 192.0.2.1 is contained within the network 192.0.2.0/24. So you can do: if (Framed-IP-Address < 172.0.0.0/8) { ... } Alan DeKok.
participants (3)
-
Alan DeKok -
Matthew Newton -
Richard J Palmer