Add DHCP leases to address-list

I have seen some posts but still dont have a clear answer, is it possible to add dhcp leases dynamically to an address list with RADIUS or any other method?

Once again, straight DHCP, no hotspot, no pppoe.

Thanks!

-dan

The manual says no: http://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server#Summary

Mikrotik-Address-List isn’t listed as a valid Access-Accept attribute.
That said, it isn’t listed in the full RADIUS client manual either. So give it a shot, try to send it back with a DHCP lease, and see what happens.

Just schedule a script to run periodically, something like:

/ip firewall address-list remove [/ip firewall address-list find list=foo];:local a;:set a [/ip dhcp-server lease find status="bound"];:local b;:for b from=0 to=([:len $a]-1) step=1 do={/ip firewall address-list add list=foo address=[/ip dhcp-server lease get [:pick $a $b] address]}

(Just replace “foo” with the name of the address list you want. WARNING: The above script deletes all list entries in the list, then adds new entries for each IP lease that is in the “bound” state.)

Wouldn’t something like that work?

Aaron out.

Hi dudes, just rigth now I probe with:

 /ip dhcp-server lease add address-list=listExample mac-address=XXXXXXXXXX address=10.x.x.x

The result was, when the ip address is bound, dynamically it’s add to address list.

Well, now I’m worried, with this setup, Will it consume a lot of recourses?

Thanks.

work without problem many years, no problem with any version (x86)
Dynamically added lease with address-list

Hello everyone,

Don’t know if this topic is still open, but in our network we are working with freeradius(daloradius web front-end) + mikrotik dictionary and it works like charm; the only ‘hack’ you need to do on dictionary attributes(MySQL dictionary table, under ‘radius’ database) is to change any Mikrotik field (already created) with ‘Mikrotik-Address-List’ field. This is the modification we made under daloradius core; if you use pure freeradius, you don’t need this hack.

When you configure the user MAC auth, you need to set up the address list attribute as ‘reply’; that’s al, all dhcp-leases coming from DHCP-server (validated from freeradius) create a dynamic entry on your Mikrotik. Don’t forget to load Mikrotik Dictionary; it’s a valid argument. ( http://wiki.mikrotik.com/wiki/Manual:RADIUS_Client )

The freeradius argument is Mikrotik-Address-List.

Hope it helps, if you have any trouble please feel free to contact me.

Regards,

Ivan Reyes
SACITEC

Hi guys,

I would like to connect my pppoe clients to my radius server and also do the billing using daloradius (front end). When I add a profile to a user, the same credentials that would have been authenticating will seize to authenticate. Anyone who knows where I might be getting it wrong.

Thank you in advance.