Can't get my "SQL Based IP Pool" running ; (
running FreeRADIUS Version 1.1.7 on FreeBSD 7.0 with Postgresql-Server-8.3beta2. I got everything working fine so far except SQL Based IP Pool --> "/http://wiki.freeradius.org/Rlm_sqlippool/"; <-- ; )

PostgreSQL:
########################################################

CREATE TABLE radippool (
       id                      BIGSERIAL PRIMARY KEY,
       pool_name               text NOT NULL,
       FramedIPAddress         INET,
       NASIPAddress            text NOT NULL,
       CalledStationId         VARCHAR(64),
       CallingStationId        text DEFAULT ''::text NOT NULL,
       expiry_time             TIMESTAMP(0) without time zone NOT NULL,
       username                text DEFAULT ''::text,
       pool_key                VARCHAR(30) NOT NULL
);

#################################################################

If I now try to do the following step - like the HowTo describes I'll get folowing result:

INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', 
'192.168.0.1');
INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', 
'192.168.0.2');
INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', 
'192.168.0.3');
INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', 
'192.168.0.4');


.. my phpPgAdmin Webinterface is telling me following Error:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*SQL Error:*

ERROR:  null value in column "nasipaddress" violates not-null constraint

*In the command:*
INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', '192.168.0.1'); INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', '192.168.0.2'); INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', '192.168.0.3'); INSERT INTO radippool (pool_name, framedipaddress) VALUES ('main_pool', '192.168.0.4');

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I do only have success if I execute the Postgres command changed like that:

INSERT INTO radippool (pool_name, framedipaddress, nasipaddress, expiry_time, pool_key) VALUES ('mypool', '192.168.5.1', '10.1.10.80', '2008-12-31 00:00:00', '0'); INSERT INTO radippool (pool_name, framedipaddress, nasipaddress, expiry_time, pool_key) VALUES ('mypool', '192.168.5.2', '10.1.10.80', '2008-12-31 00:00:00', '0');

^^ but I'm not happy with those Datas .. actualy I'm pretty unsure if that's working stuff !! Besides that I tried to have a expire date like 86400 Seconds .. but didn't work. And Where is my Netmask in radippool table?? ;) question over question ;)



any way .. still "radius -X" tells me:
++++++++++++++++++++++++++++++++++++++++++++
modcall: leaving group CHAP (returns ok) for request 0
Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 0
rlm_sqlippool: Framed-IP-Address already exists
modcall[post-auth]: module "sqlippool" returns noop for request 0
rlm_sql (sql): Processing sql_postauth
radius_xlat:  'test'
++++++++++++++++++++++++++++++++++++++++++++




This is how my radiusd.conf looks like in the ippool section:

##################################################################################
##################################################################################

      ippool main_pool {

               #  range-start,range-stop: The start and end ip
               #  addresses for the ip pool
#               range-start = 192.168.1.1
#               range-stop = 192.168.3.254

               #  netmask: The network mask used for the ip's
#               netmask = 255.255.255.0

               #  cache-size: The gdbm cache size for the db
               #  files. Should be equal to the number of ip's
               #  available in the ip pool
#               cache-size = 800

# session-db: The main db file used to allocate ip's to clients
#               session-db = ${raddbdir}/db.ippool

               # ip-index: Helper db index file used in multilink
#               ip-index = ${raddbdir}/db.ipindex

# override: Will this ippool override a Framed-IP-Address already set
               override = yes

# maximum-timeout: If not zero specifies the maximum time in seconds an
               # entry may be active. Default: 0
#               maximum-timeout = 0
       }

#        $INCLUDE  ${confdir}/sqlippool.conf

       $INCLUDE  ${confdir}/postgresqlippool.conf

#        OTP token support.  Not included by default.
#        $INCLUDE  ${confdir}/otp.conf

##################################################################################
##################################################################################








This is how my users conf does look like:

##################################################
test    User-Password == "123456"
       Service-Type = Framed-User,
       Framed-Protocol = PPP,
       Framed-IP-Address = 255.255.255.254,
#        Framed-IP-Netmask = 255.255.255.255,
       Framed-Routing = Broadcast-Listen,
       Framed-Filter-Id = "std.ppp",
       Framed-MTU = 1492,
       Framed-Compression = Van-Jacobsen-TCP-IP,
       Pool-Name = "mypool",
##################################################
^^ WTF goes wrong here ???  ; ))

If I comment "Framed-IP-Address = 255.255.255.254," out it says pool-name not found
radius -X tells me:
rlm_sqlippool: missing pool_name
modcall[post-auth]: module "sqlippool" returns noop for request 0
rlm_sql (sql): Processing sql_postauth


It would be very greathful to get some useful advices here ; )


Thank you

Regards,

    Leander


P.S. It might be a double posting - but I'm not sure because I didn't get a confirmation about it and I also didn't find it ... so if yes - sorry for that ; )

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to