View Single Post
Old 11th December 2008, 19:18
SaFi2266 SaFi2266 is offline
HowtoForge Supporter
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default Ubuntu 8.10 & FreeRADIUS 2.x Management With DaloRADIUS 0.9-7

Hi, again

Since posting this issue and I'm keep trying to find a proper solution to get finally all configurations worked. I've read all the conf files, doing a lot of searches. at last I discover that I was hasty reckless and inattentive.

Now you can concern this is little modification to get FreeRADIUS on Ubuntu 8.10 work with daloRADIUS 0.9-7 perfectly.

First of all you can fellow this Howto till to reach when FR start, it seem it is started with something like this
/var/run/freeradius/ not found
in fact FR didn't work in spite it tell it Start [OK]
to fix this go to /etc/freeradius/radiusd.conf search on
run_dir = ${localstatedir}/run/radiusd
change it to
run_dir = ${localstatedir}/run/freeradius
and replace
pidfile = ${run_dir}/
pidfile = ${run_dir}/
stop FR then restar it
/etc/init.d/freeradius stop
/etc/init.d/freeradius start
then FR will started normally and generate it's pid file
after that you can test FR worked like this: add any user on your local machine to /etc/freeradius/uers then test it with
radtest user passwd localhost 1812 testing123
it is work for me and I get
Sending Access-Request of id 46 to port 1812
        User-Name = "user"
        User-Password = "passwd"
        NAS-IP-Address =
        NAS-Port = 1812
rad_recv: Access-Accept packet from host port 1812, id=46, length=32
then you ready to configure FR with MySQL, it is quite simple thing, just fellow these steps
  1. go to the file /etc/freeradius/sites-enabled/default and comment out sql from the sections {authorize, accounting and session} you can comment unix and files from section {authorize}
  2. add database and user "radius" or whatever name you prefer to your radius db to MySQL server like this
    first login to you server
    mysql -u root -p
    GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radpass";
    or simply use phpmyadmin for that purpose
  3. edit the file /etc/freeradius/sql.conf to meet your setting (location, username ,password and db name) near the bottom of the file comment out the readclients = no and made it like this
    readclients = yes
  4. Download sql_schema & daloradius.conf zipped files to /opt and unzip it
  5. add database schema to your database radius like this
    mysql -u root -p radius < /opt/mysql-dalo-and-fr2x.sql
Now you ready to download daloRADIUS to your PC then move it to your Ubuntu machine in /opt and untar it there.
to configure it with MySQL & FR you may fellow this steps
  1. edit the file /opt/daloradius.conf to meet your configuration the replace it with original one on /opt/daloradius-0.9-7/library/daloradius.conf
  2. if you didn't install the necessary packages and extensions yet you can do it now by
    apt-get install apache2 php5 php5-mysql php5-gd php-pear php5-db
  3. Code:
    cd /opt
    cp daloradius-0.9-7/ /var/www -R
    chown www-data:www-data /var/www/daloradius-0.9-7 -R
    chmod 644 /var/www/daloradius-0.9-7/library/daloradius.conf
    cd /
  4. Edit the /etc/apache2/apache2.conf file and append this to the end of the file
    Alias /radius-admin "/var/www/daloradius-0.9-7/"
       <Directory /var/www/daloradius-0.9-7/>
          Options None
          order deny,allow
          deny from all
          allow from 
          allow from x.x.x.x ## assign here whatever IP's addresses that you can access to your daloradius admin from it
  5. restart apache
    /etc/init.d/apache2 restart
  6. point to http://your-server-ip/radius-admin and login with

    username: administrator
    password: radius
  7. you can now test it by adding your nas to the nas list
  8. Congratulations you are done

I attach here the two files (schema & conf) in case the it's link broken. please remove txt extension from both after you dl it
Attached Files
File Type: txt daloradius.conf.txt (1.3 KB, 781 views)
File Type: txt url.txt (70 Bytes, 519 views)
Reply With Quote