31/3/15

Centos 6 Instalar FreeRadius Server con administracion web daloradius y phpmyadmin

principal:
http://linuxdrops.com/install-freeradius-with-web-based-management-daloradius-on-centosrhel-debian-ubuntu/
Fixes:
http://sourceforge.net/p/daloradius/discussion/684102/thread/94933b26/
http://forum.mikrotik.com/viewtopic.php?t=52830
http://sourceforge.net/p/daloradius/mailman/message/21201568/

phpmyadmin:
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-a-centos-6-4-vps

Overview

FreeRADIUS is the most popular open source RADIUS server[2] and the most widely deployed RADIUS server in the world.[2] It supports all common authentication protocols, and the server comes with a PHP-based web user administration tool called dialupadmin . It is the basis for many commercial RADIUS products and services, such as embedded systems, RADIUS appliances that support Network Access Control, and WiMAX. It supplies the AAA needs of many Fortune-500 companies, telcos, and Tier 1 ISPs. It is also widely used in the academic community, including eduroam. The server is fast, feature-rich, modular, and scalable. The currently shipping stable version is 2.2.0.

Install FreeRadius with Web Based Management Daloradius on CentOS/RHEL, Debian, Ubuntu

On CentOS/RHEL 5
On CentOS/RHEL 6
Ubuntu or Debian
Start the MySQL instance
Next we need to create the radius database, so execute
Create the database and grant all privileges to user radius
Now we need to build the schema for radius database
On CentOS/RHEL
On Debian/Ubuntu
Now edit the sql.conf file and populate the database credentials.
On CentOS/RHEL
On Debian, Ubuntu
Enter your mysql database details you just created
Next open /etc/raddb/radiusd.conf
On CentOS/RHEL
On Debian, Ubuntu
Uncomment Line 700 to include sql.conf
Next edit /etc/raddb/sites-available/default and uncomment the line 177 containing ‘sql’ under the authorize {} section and line 406 ‘sql’ under the accounting {} section, also uncomment ‘sql’ under session {} line 454.
On CentOS/RHEL
On Debian, Ubuntu
Now, edit /etc/raddb/sites-available/inner-tunnel and uncomment the line 131 and line 255 containing ‘sql’ under authorize {} and under session {}.
On CentOS/RHEL
On Debian, Ubuntu
Open up /etc/raddb/clients.conf
On CentOS/RHEL
On Debian, Ubuntu
To add NAS clients that will use RADIUS server for AAA you have to add the following to the clients.conf file. Append a block such as this, replace 192.168.209.1 with the ip address of your NAS client that will use FreeRADIUS for AAA.
Restart FreeRADIUS for the new configuration to take effect.
On CentOS/RHEL
On Ubuntu, Debian
If you encounter any problems you can run FreeRADIUS in debug mode to find any authentication issues. To run FreeRADIUS in debug mode execute
On CentOS/RHEL
On Ubuntu, Debian
Update:
Radius use MySQL to store usernames and passwords. To manage radius server daloradius is a good choice. To install daloradius
Next open the daloradius.conf.php
Add the database username, password and db name.
Move daloradius to the web root directory
On Debian, Ubuntu
On CentOS/RHEL
Point your browser to http://ip-address-or-hostname/daloradius
Login using
Username administrator
Password radius
You can add new groups and users to the database and manage the radius server. 


Fix1:
# yum install php-pear*
# pear install DB


Fix2:
Database error
Error Message: DB Error: no such table
Debug info: SELECT id, username FROM operators WHERE username = 'Administrador' AND password = 'radius' [nativecode=1146 ** Table 'radius.operators' doesn't exist]


to repair this you must:

# cd /var/www/daloradius/contrib/db/
# mysql -u(your username) -p(your password) radius(or the name of database you created) 


 
Fix3

> It seems that you don't have the NAS table in your schema for some reason.
> To apply it get on MySQL console and enter the following:
>
> DROP TABLE IF EXISTS `nas`;
> CREATE TABLE `nas` (
>   `id` int(10) NOT NULL auto_increment,
>   `nasname` varchar(128) NOT NULL,
>   `shortname` varchar(32) default NULL,
>   `type` varchar(30) default 'other',
>   `ports` int(5) default NULL,
>   `secret` varchar(60) NOT NULL default 'secret',
>   `community` varchar(50) default NULL,
>   `description` varchar(200) default 'RADIUS Client',
>   PRIMARY KEY  (`id`),
>   KEY `nasname` (`nasname`)
> );
 
 








Configuración IP estática en Centos 6

## Configure eth0
# # vi /etc/sysconfig/network-scripts/ifcfg-eth0  
DEVICE="eth0"
NM_CONTROLLED="yes" ONBOOT=yes HWADDR=A4:BA:DB:37:F1:04 TYPE=Ethernet BOOTPROTO=static NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 IPADDR=192.168.1.44 NETMASK=255.255.255.0
## Configure Default Gateway
# # vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos6 GATEWAY=192.168.1.1  
## Restart Network Interface
#
/etc/init.d/network restart
## Configure DNS Server
# # vi /etc/resolv.conf
nameserver 8.8.8.8 # Replace with your nameserver ip
nameserver 192.168.1.1 # Replace with your nameserver ip