Hi: I am trying to configure a server-side IP pool for select pptp users to bypass the NAS's internal pool. The documentation appears sparse, but this is what I've done so far: In raddb/radiusd.conf: ippool users_pool { range-start = 172.16.1.2 range-stop = 172.16.1.253 netmask = 255.255.255.0 cache-size = 251 session-db = ${db_dir}/db.ippool ip-index = ${db_dir}/db.ipindex override = yes } In raddb/users sometestuser Pool-Name :="users_pool" Framed-Protocol == PPP, Framed-Compression = Van-Jacobson-TCP-IP However, "sometestuser" is simply allocated an IP from the NAS's internal pool, seemingly ignoring this. I also noticed that the files db.ippool and db.ipindex are not being created. Is there something else I'm missing? TIA, James Smallacombe PlantageNet, Inc. CEO and Janitor up@3.am http://3.am =========================================================================
up@3.am wrote:
I am trying to configure a server-side IP pool for select pptp users to bypass the NAS's internal pool. The documentation appears sparse, but this is what I've done so far:
In raddb/radiusd.conf:
ippool users_pool {
The examples show it using "main_pool". The name doesn't matter, but it's a hint: $ grep main_pool raddb/sites-available/* You can re-name "main_pool" to "users_pool", if you want. You have to tell the server to allocate IP's in the post-auth section, and to manage them from the accounting section. Alan DeKok.
On Tue, 2 Jun 2009, Alan DeKok wrote:
up@3.am wrote:
I am trying to configure a server-side IP pool for select pptp users to bypass the NAS's internal pool. The documentation appears sparse, but this is what I've done so far:
In raddb/radiusd.conf:
ippool users_pool {
The examples show it using "main_pool". The name doesn't matter, but it's a hint:
$ grep main_pool raddb/sites-available/*
You can re-name "main_pool" to "users_pool", if you want.
You have to tell the server to allocate IP's in the post-auth section, and to manage them from the accounting section.
Ok, I wasn't sure where the "post-auth section" even was...I had been looking in the radiusd.conf...thanks for the hint. I just added the following to the raddb/sites-available/default: accounting { # Return an address to the IP Pool when we see a stop record. # main_pool users_pool post-auth { # Get an address from the IP Pool. # main_pool users_pool Now I get this running debug mode: } /usr/etc/raddb/radiusd.conf[1824]: Failed to link to module 'rlm_ippool': rlm_ippool.so: cannot open shared object file: No such file or directory /usr/etc/raddb/sites-enabled/default[337]: Failed to find module "users_pool". /usr/etc/raddb/sites-enabled/default[314]: Errors parsing accounting section. } } Errors initializing modules ...and indeed, that file exists nowhere on the server. Was it a part of freeradius-server-2.0.4 ? James Smallacombe PlantageNet, Inc. CEO and Janitor up@3.am http://3.am =========================================================================
up@3.am wrote:
Now I get this running debug mode:
} /usr/etc/raddb/radiusd.conf[1824]: Failed to link to module 'rlm_ippool': rlm_ippool.so: cannot open shared object file: No such file or directory
Because you don't have the GDBM libraries or header files.
/usr/etc/raddb/sites-enabled/default[337]: Failed to find module "users_pool". /usr/etc/raddb/sites-enabled/default[314]: Errors parsing accounting section. } } Errors initializing modules
...and indeed, that file exists nowhere on the server. Was it a part of freeradius-server-2.0.4 ?
Yes. But we don't re-implement a DBM database. We rely on a library for that, and you don't have the library or header files installed. Alan DeKok.
On Wed, 3 Jun 2009, Alan DeKok wrote:
Because you don't have the GDBM libraries or header files.
Ok, I installed those, and while I was at it, installed the latest radiusd. The first error I got involved the "experimental" raddb/sites-available/control-socket which was included in the old radiusd.conf: $INCLUDE sites-enabled/. I moved the file and radiusd started and worked as it did before. However, when I uncomment my ippool statement, I now get this: Module: Linked to module rlm_ippool Module: Instantiating users_pool ippool users_pool { session-db = "$(raddbdir)/db.ippool" ip-index = "$(raddbdir)/db.ipindex" key = "%{NAS-IP-Address} %{NAS-Port}" range-start = 172.16.1.2 range-stop = 172.16.1.253 netmask = 255.255.255.0 cache-size = 251 override = yes maximum-timeout = 0 } rlm_ippool: Failed to open file $(raddbdir)/db.ippool: No such file or directory /usr/etc/raddb/radiusd.conf[1824]: Instantiation failed for module "users_pool" /usr/etc/raddb/sites-enabled/default[337]: Failed to find module "users_pool". /usr/etc/raddb/sites-enabled/default[314]: Errors parsing accounting section. Errors initializing modules ----- If I understand correctly, if I am running radiusd as root, shouldn't it simply create the db. files itself when started? I tried a "touch raddb/db.ippool" but it changed nothing. Again, thanks for your patience... James Smallacombe PlantageNet, Inc. CEO and Janitor up@3.am http://3.am =========================================================================
Replying to myself....erm, never mind...I must have a fairly old raddb/radiusd.conf...I found this by googling:
db_dir = $(raddbdir) <<==
It should be:
db_dir = ${raddbdir} (brackets are wrong)
On Wed, 3 Jun 2009, up@3.am wrote:
On Wed, 3 Jun 2009, Alan DeKok wrote:
Because you don't have the GDBM libraries or header files.
Ok, I installed those, and while I was at it, installed the latest radiusd. The first error I got involved the "experimental" raddb/sites-available/control-socket which was included in the old radiusd.conf: $INCLUDE sites-enabled/. I moved the file and radiusd started and worked as it did before.
However, when I uncomment my ippool statement, I now get this:
Module: Linked to module rlm_ippool Module: Instantiating users_pool ippool users_pool { session-db = "$(raddbdir)/db.ippool" ip-index = "$(raddbdir)/db.ipindex" key = "%{NAS-IP-Address} %{NAS-Port}" range-start = 172.16.1.2 range-stop = 172.16.1.253 netmask = 255.255.255.0 cache-size = 251 override = yes maximum-timeout = 0 } rlm_ippool: Failed to open file $(raddbdir)/db.ippool: No such file or directory /usr/etc/raddb/radiusd.conf[1824]: Instantiation failed for module "users_pool" /usr/etc/raddb/sites-enabled/default[337]: Failed to find module "users_pool". /usr/etc/raddb/sites-enabled/default[314]: Errors parsing accounting section. Errors initializing modules -----
If I understand correctly, if I am running radiusd as root, shouldn't it simply create the db. files itself when started? I tried a "touch raddb/db.ippool" but it changed nothing.
Again, thanks for your patience...
James Smallacombe PlantageNet, Inc. CEO and Janitor up@3.am http://3.am ========================================================================= - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
James Smallacombe PlantageNet, Inc. CEO and Janitor up@3.am http://3.am =========================================================================
participants (2)
-
Alan DeKok -
up@3.am