Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image RemovedImage Added


To test the RADIUS server directly, execute inside the VM:




Test 

sudo

...

radtest testuser1 password1 localhost 1812 testing123
check MySQL database

sudo mysql -u root -psecret radius


Code Block
titlemysql
collapsetrue
me@server01:~$ sudo mysql -u root -psecret radius
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 220
Server version: 10.3.25-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [radius]>


show databases

show databases;


show tables

show tables;


List nas

select * from nas;


Code Block
titlelist nas
MariaDB [radius]> select * from nas;
+----+---------------+---------------+-------+-------+-------------+--------+-----------+-------------+
| id | nasname       | shortname     | type  | ports | secret      | server | community | description |
+----+---------------+---------------+-------+-------+-------------+--------+-----------+-------------+
|  1 | 192.168.0.203 | laptop        | other |     0 | mysecret123 |        |           |             |
|  2 | 192.168.0.10  | localhost     | other |     0 | testing123  |        |           |             |
|  5 | 127.0.1.1     | localhost_1.1 | other |     0 | testing123  |        |           |             |
|  4 | 127.0.0.1     | localhost_0.1 | other |     0 | testing123  |        |           |             |
+----+---------------+---------------+-------+-------+-------------+--------+-----------+-------------+
4 rows in set (0.000 sec)


List users

select * from radcheck;


Code Block
titleradcheck
collapsetrue
MariaDB [radius]> select * from radcheck;
+----+-----------+--------------------+----+-----------+
| id | username  | attribute          | op | value     |
+----+-----------+--------------------+----+-----------+
|  1 | testuser1 | Cleartext-Password | := | password1 |
|  2 | testuser2 | Cleartext-Password | := | password2 |
+----+-----------+--------------------+----+-----------+
2 rows in set (0.000 sec)



SELECT id, username, attribute, value, op FROM radcheck ORDER BY id;


Code Block
titlelist users
MariaDB [radius]> SELECT id, username, attribute, value, op FROM radcheck ORDER BY id;
+----+-----------+--------------------+-----------+----+
| id | username  | attribute          | value     | op |
+----+-----------+--------------------+-----------+----+
|  1 | testuser1 | Cleartext-Password | password1 | := |
|  2 | testuser2 | Cleartext-Password | password2 | := |
+----+-----------+--------------------+-----------+----+
2 rows in set (0.000 sec)





SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'testuser1' ORDER BY id;

SELECT id, username, attribute, value, op FROM radcheck WHERE username = '

...

testuser1' ORDER BY id;

SELECT id, username, attribute, value, op FROM radreply WHERE username = '

...

testuser1' ORDER BY id;



SELECT groupname FROM radusergroup WHERE username = '

...

testuser1' ORDER BY priority;

INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '

...

testuser1','testpwd','Access-Accept', '2018-01-26 22:07:14');



Create an user with daloRadius


SELECT id, username, attribute, value, op FROM radcheck ORDER BY id;

Image Removed