Difference between revisions of "RADIUS"

From Dogtag
Jump to: navigation, search
m
m
 
Line 20: Line 20:
 
<pre>
 
<pre>
 
$ systemctl start radiusd
 
$ systemctl start radiusd
 +
</pre>
 +
 +
= Testing =
 +
 +
Edit /etc/raddb/users:
 +
 +
<pre>
 +
bob    Cleartext-Password := "hello"
 +
        Reply-Message := "Hello, %{User-Name}"
 +
</pre>
 +
 +
Restart the server:
 +
 +
<pre>
 +
$ systemctl restart radiusd
 +
</pre>
 +
 +
To authenticate:
 +
 +
<pre>
 +
$ radtest bob hello 127.0.0.1 100 testing123
 +
Sent Access-Request Id 152 from 0.0.0.0:39067 to 127.0.0.1:1812 length 73
 +
User-Name = "bob"
 +
User-Password = "hello"
 +
NAS-IP-Address = 10.0.0.18
 +
NAS-Port = 100
 +
Message-Authenticator = 0x00
 +
Cleartext-Password = "hello"
 +
Received Access-Accept Id 152 from 127.0.0.1:1812 to 127.0.0.1:39067 length 32
 +
Reply-Message = "Hello, bob"
 
</pre>
 
</pre>

Latest revision as of 04:29, 20 September 2022

Installation

To install RADIUS packages:

$ dnf install freeradius freeradius-utils freeradius-postgresql

Initialization

To generate certificates:

$ cd /etc/raddb/certs
$ ./bootstrap

Starting RADIUS Server

$ systemctl start radiusd

Testing

Edit /etc/raddb/users:

bob     Cleartext-Password := "hello"
        Reply-Message := "Hello, %{User-Name}"

Restart the server:

$ systemctl restart radiusd

To authenticate:

$ radtest bob hello 127.0.0.1 100 testing123
Sent Access-Request Id 152 from 0.0.0.0:39067 to 127.0.0.1:1812 length 73
	User-Name = "bob"
	User-Password = "hello"
	NAS-IP-Address = 10.0.0.18
	NAS-Port = 100
	Message-Authenticator = 0x00
	Cleartext-Password = "hello"
Received Access-Accept Id 152 from 127.0.0.1:1812 to 127.0.0.1:39067 length 32
	Reply-Message = "Hello, bob"