View Single Post
  #2  
Old 11th December 2008, 18: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
Code:
/var/run/freeradius/freeradius.pid 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
Code:
run_dir = ${localstatedir}/run/radiusd
change it to
Code:
run_dir = ${localstatedir}/run/freeradius
and replace
Code:
pidfile = ${run_dir}/radiusd.pid
with
Code:
pidfile = ${run_dir}/freeradius.pid
stop FR then restar it
Code:
/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
Code:
radtest user passwd localhost 1812 testing123
it is work for me and I get
Code:
Sending Access-Request of id 46 to 127.0.0.1 port 1812
        User-Name = "user"
        User-Password = "passwd"
        NAS-IP-Address = 10.10.0.11
        NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 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
    Code:
    mysql -u root -p
    then
    Code:
    CREATE DATABASE radius;
    GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radpass";
    FLUSH PRIVILEGES;
    exit;
    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
    Code:
    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
    Code:
    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
    Code:
    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
    Code:
    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 127.0.0.1 
          allow from x.x.x.x ## assign here whatever IP's addresses that you can access to your daloradius admin from it
     </Directory>
  5. restart apache
    Code:
    /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, 768 views)
File Type: txt url.txt (70 Bytes, 509 views)
Reply With Quote