User Tools

Site Tools


сервис_freeradius

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_freeradius [2022/03/05 15:25]
val [Настройка c использованием текстовых файлов]
сервис_freeradius [2023/06/28 12:00] (current)
val [Debian/Ubuntu]
Line 39: Line 39:
        ​shortname ​      = switch        ​shortname ​      = switch
 } }
 +
 +#client switch1 { secret = testing123 }
 +#client switch2 { secret = testing123 }
 +#client switch3 { secret = testing123 }
 </​code><​code>​ </​code><​code>​
 server# :> /​etc/​freeradius/​3.0/​users server# :> /​etc/​freeradius/​3.0/​users
Line 51: Line 55:
 #     ​Service-Type = NAS-Prompt-User,​ #     ​Service-Type = NAS-Prompt-User,​
 #     ​cisco-avpair = "​shell:​priv-lvl=15"​ #     ​cisco-avpair = "​shell:​priv-lvl=15"​
- 
-#for ansible 
-root Cleartext-Password := "​cisco"​ 
  
 student Cleartext-Password := "​password"​ student Cleartext-Password := "​password"​
  
-401 Cleartext-Password := "401", Simultaneous-Use :1 +## for ansible 
- +#root Cleartext-Password := "cisco" 
-402 Cleartext-Password := "402", Simultaneous-Use ​:= 1 +#     ​Service-Type NAS-Prompt-User,​ 
- +#     cisco-avpair ​= "shell:priv-lvl=15"
-403 Cleartext-Password := "403", Simultaneous-Use := 2 +
 </​code><​code>​ </​code><​code>​
 server# cat /​etc/​freeradius/​3.0/​radiusd.conf server# cat /​etc/​freeradius/​3.0/​radiusd.conf
Line 98: Line 97:
 ==== Debian/​Ubuntu ==== ==== Debian/​Ubuntu ====
 <​code>​ <​code>​
 +root@server:​~#​ systemctl enable freeradius
 +
 root@server:​~#​ service freeradius restart root@server:​~#​ service freeradius restart
 </​code>​ </​code>​
Line 110: Line 111:
  
 $ radtest user1 rpassword1 127.0.0.1 0 testing123 $ radtest user1 rpassword1 127.0.0.1 0 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,​User-Password=401,​NAS-IP-Address=127.0.0.1"​ | radclient localhost auth testing123
сервис_freeradius.1646483107.txt.gz · Last modified: 2022/03/05 15:25 by val