
mysql> GRANT ALL PRIVILEGES ON radius.* TO 'radius'@'localhost' IDENTIFIED BY
'mysqlsecret';
mysql> FLUSH PRIVILEGES;
mysql> quit
STEP 2: Prepare FreeRADIUS to use MySQL as backend
vi /etc/freeradius/sql.conf
server = "localhost"
login = "radius"
password = "mysqlsecret"
vi etc/freeradius/clients.conf
client localhost {
ipaddr = 127.0.0.1
secret = radiussecret
require_message_authenticator = no
}
STEP 3: Create a Radius test user to check radius.
Before activating the SQL backend, we test against an user in a text-file and we
run a radius session
vi /etc/freeradius/users
"John Doe" Cleartext-Password := "hello"
Reply-Message = "Hello, %{User-Name}"
root@fitvt:~# radtest "John Doe" hello 127.0.0.1 0 radiussecret
Sending Access-Request of id 238 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=238, length=20
STEP 4: Active the SQL Backend
Change every appearance of “file” for “sql” in the configuration file
vi /etc/freeradius/sites-available/default
if you want to use software packages like ezRADIUS or Dialup Admin you need to
enable logging to sql
Comentários a estes Manuais