This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
сервис_freeradius [2023/02/14 09:04] val [Тестирование сервера] |
сервис_freeradius [2024/12/06 13:35] (current) val [Настройка с использованием mysql] |
||
|---|---|---|---|
| Line 8: | Line 8: | ||
| <code> | <code> | ||
| root@server:~# apt install freeradius | root@server:~# apt install freeradius | ||
| - | |||
| - | ubuntu20# systemctl enable freeradius | ||
| </code> | </code> | ||
| Line 99: | Line 97: | ||
| ==== Debian/Ubuntu ==== | ==== Debian/Ubuntu ==== | ||
| <code> | <code> | ||
| - | root@server:~# systemctl enable freeradius | + | root@server:~# ###systemctl enable freeradius |
| root@server:~# service freeradius restart | root@server:~# service freeradius restart | ||
| Line 113: | Line 111: | ||
| $ radtest user1 rpassword1 127.0.0.1 0 testing123 | $ radtest user1 rpassword1 127.0.0.1 0 testing123 | ||
| + | $ radtest root cisco 127.0.0.1 0 testing123 | ||
| $ echo "User-Name=student,User-Password=password,NAS-IP-Address=127.0.0.1" | radclient localhost auth testing123 | $ echo "User-Name=student,User-Password=password,NAS-IP-Address=127.0.0.1" | radclient localhost auth testing123 | ||
| # tail -f /var/log/freeradius/radius.log | # tail -f /var/log/freeradius/radius.log | ||
| - | |||
| - | |||
| - | |||
| - | $ echo "User-Name=401,User-Password=401,NAS-IP-Address=127.0.0.1" | radclient localhost auth testing123 | ||
| - | |||
| - | $ echo "User-Name=401,Acct-Session-Id=6000006B,Acct-Status-Type=Start,NAS-IP-Address=127.0.0.1,NAS-Port=401402"| radclient localhost acct testing123 | ||
| - | |||
| - | # radwho -R | ||
| - | |||
| - | $ echo "User-Name=401,Acct-Session-Id=6000006B,Acct-Status-Type=Stop,NAS-IP-Address=127.0.0.1,NAS-Port=401402"| radclient localhost acct testing123 | ||
| </code> | </code> | ||
| Line 216: | Line 205: | ||
| ... | ... | ||
| </code><code> | </code><code> | ||
| - | mysql> insert into radcheck (username, attribute, value, op) values ("401", "Cleartext-Password", "401", ":="); | + | mysql> insert into radcheck (username, attribute, value, op) values ("ussr1", "Cleartext-Password", "password1", ":="); |
| mysql> select acctsessionid, username, acctstarttime, acctstoptime, callingstationid, calledstationid from radacct; | mysql> select acctsessionid, username, acctstarttime, acctstoptime, callingstationid, calledstationid from radacct; | ||