DHCP with Radius Auth

Hi, I’ve been trying to set up a simple setup to test DHCP using freeradius to get the ip, but I keep getting an access reject for some unknown reason.

I’ve done a little bit of research and I don’t know what I’m doing wrong. On the freeradius, I have the username as the mac address of the computer I’m wanting to auth for dhcp, and the password is blank, but every attempt gives an access-reject.

The only reply should be the Framed-IP-Address

I have double and triple checked every setting to do with the radius ip, password, etc. (Tested that this wasn’t it by entering a false password, which changed the error)


00:03:21 radius,debug new request 17:04 code=Access-Request service=dhcp called-id
=server1
00:03:21 radius,debug sending 17:04 to 192.168.68.20:1812
00:03:21 radius,debug,packet sending Access-Request with id 6 to 192.168.68.20:181
2
00:03:21 radius,debug,packet Signature = 0x2eb141f241b71efb79e2a9e37545e146
00:03:21 radius,debug,packet NAS-Port-Type = 15
00:03:21 radius,debug,packet NAS-Port = 2210398211
00:03:21 radius,debug,packet Calling-Station-Id = “1:0:1d:f:c2:3:b0”
00:03:21 radius,debug,packet Called-Station-Id = “server1”
00:03:21 radius,debug,packet User-Name = “00:1D:0F:C2:03:B0”
00:03:21 radius,debug,packet User-Password = 0x
00:03:21 radius,debug,packet NAS-Identifier = “MikroTik”
00:03:21 radius,debug,packet NAS-IP-Address = 192.168.68.247
00:03:22 radius,debug,packet received Access-Reject with id 6 from 192.168.68.20:1
812

Run FreeRADIUS with “radiusd -X”, as suggested everywhere in the FreeRADIUS documentation. The reason for the reject will be in the output of radiusd. You may want to run it inside “script” to collect the output.

Most likely, the MikroTik is not sending an empty password with the radius access request.

In my setup, I don’t use a password in RADIUS. I just set “Auth-Type := Accept” for the MAC addresses I want to allow on my network. In the MySQL radcheck table it looks like:

+--------+-------------------+-----------+----+--------+
| id     | username          | attribute | op | value  |
+--------+-------------------+-----------+----+--------+
| 285999 | DC:0E:A1:xx:xx:xx | Auth-Type | := | Accept |
+--------+-------------------+-----------+----+--------+