Install and Configure FreeRadius
debian 5.0.6
FreeRADIUS Version 2.0.4
Install the necessary: \u200b\u200b
apt-get install phpmyadmin mysql-server freeradius freeradius-mysql
edit the clients.conf
vim / etc / freeradius / clients.conf
Insert / edit the following lines:
client localhost {ipaddr = 127.0
.0.1
secret = 123456789
shortname = nome_client
}127.0.0.1 is the IP address of client inquest if the client resides on the same machine freeradius
sql.conf edit the file:
vim / etc / freeradius / sql.conf
enter / change the following lines:
{sql database = "mysql"
driver = "$ {database} rlm_sql_"
server = "localhost"
login = "radius" password
= "123456"
radius_db = "radius"
}
mysql server indicates the server, login and password are user and password to access mysql database name and radius_db
now need to create the mysql database in phpmyadmin, or you can use:
mysql-u root-p
the root password for mysql
CREATE DATABASE radius;
quit
radius and create the user password to 123456, and Privileggi its database for the radius
here is the sql file to create the various tables
http://wiki.freeradius.org/MySQL_DDL_script
or
http://github.com/alandekok/freeradius-server/blob/stable/raddb/sql/mysql/schema.sql
edit the file default:
vim / etc / freeradius / sites-available/default
make the following changes
Authorize {
# unix
# sql file
}
accounting {# unix
sql
}
in radiusd.conf
vim / etc / freeradius / radiusd.conf
uncomment or add
$ INCLUDE sql.conf
Test
radius in the table included in the database user and password in radcheck follows
mysql-u root-p
the root password for mysql
INSERT INTO radcheck (UserName, Attribute, Value) VALUES ('user', 'password', '1234 ');
quit
now we have added a user with user password 1234
now stopped freeradius / etc / init.d / freeradius stop
and we start in debug mode
freeradius-xxxx
and another terminal give the command
user radtest 000 000 123 456 789 0 127.0.0.1
where 123456789 is the password set in clients.conf
0 comments:
Post a Comment