Community discussions

MUM Europe 2020
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Fri Oct 06, 2006 5:03 am

Add DHCP leases to address-list

Wed Jul 27, 2011 10:28 pm

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.


Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: Add DHCP leases to address-list

Wed Jul 27, 2011 10:47 pm

The manual says no: ... er#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.
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print detail", "/ip firewall export", and an accurate network diagram.
User avatar
Member Candidate
Member Candidate
Posts: 121
Joined: Tue Dec 16, 2008 12:17 am

Re: Add DHCP leases to address-list

Thu Jul 28, 2011 3:12 am

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.
Posts: 27
Joined: Wed Mar 11, 2009 10:49 pm

Re: Add DHCP leases to address-list

Thu Dec 15, 2011 11:35 pm

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?

User avatar
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Dec 21, 2004 12:13 am

Re: Add DHCP leases to address-list

Fri Dec 16, 2011 1:07 am

work without problem many years, no problem with any version (x86)
Dynamically added lease with address-list
just joined
Posts: 3
Joined: Wed Oct 19, 2011 8:08 am

Re: Add DHCP leases to address-list

Thu Jun 16, 2016 9:44 pm

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. ( )

The freeradius argument is Mikrotik-Address-List.

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


Ivan Reyes
just joined
Posts: 1
Joined: Tue Jan 03, 2017 8:36 am

Re: Add DHCP leases to address-list

Wed Jan 04, 2017 7:53 am

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.

Who is online

Users browsing this forum: mandrade, shamet, Sob and 99 guests