Hello.
I have a problem, maybe someone knows how to solve it.
192.168.1.1 - Bandwidth Management (Mikrotik - NAT router)
192.168.1.2 - FreeRADIUS
192.168.1.3 - pppoe-server (Mikrotik - NAS)
10.10.10.2 - the pppoe-client
Internet ----- (192.168.1.1) ---------- (192.168.1.2)
…---------- (192.168.1.3) ---------- (pppoe-client 10.10.10.2)
Everything works fine: freeRadius and NAS and Bandwidth Management.
I want a radius server automatically added the client ip address to “/ ip firewall address-list add address:10.10.10.2 list=super” on the machine 192.168.1.1 (Bandwidth Management)
Is this possible?
At the same time when a customer logs on in machine 192.168.1.3, the IP address is automatically added to the address-list on machine 192.168.1.1
Send back that attribute, and the user will be added to an address list on 192.168.1.3. Then you can add DSCP/TOS marks to those packets in the firewall mangle facility of that router, and have the router at 192.168.1.1 do its policy based on the DSCP/TOS marks rather than based on an address list.
You cannot add the IP to an address list on 192.168.1.1 via RADIUS because that router isn’t involved in the RADIUS transaction. You may be able to run scripts on the RADIUS server that fire and make calls to 192.168.1.1 via the API and make changes, and FreeRADIUS is certainly flexible enough to do that, but that’s a heck of a lot more work and potentially more fragile. I’d prefer the method I posted. But, again, FreeRADIUS does have postauthentication hooks that let you call scripts after the RADIUS traffic is done, and the API is fully documented and has libraries in many different languages - if you want to go that way.
rules on the 192.168.1.3 should look like this?
which is correct? or completely different?
The rules on the server NAT look like?
I think in the right direction?
I find it hard to tell from that what is going on. Can you post the relevant text configuration exported and wrapped in code tags? Screenshots may not show all relevant columns, etc.
Can someone shed a light on this. Looks complicated to me and the solutions are hardly understandable by novices.
I would like to add a user upon authenticated in freeradius to a certain address-list on mikrotik so that I can do HTB queues instead of the simple queues that freeradius does, for the purpose of traffic shaping and limitation.
How to assign PPTP user in Freeradius with Mikrotik’s adress-list ?
I’m using Mysql+Freeradius.
I’ve tried to add data to radreply
INSERT INTO radius.radreply (username, attribute, op, value) VALUES (‘user1’, ‘Mikrotik-Address-List’, ‘:=’, ‘remote_managers’);
but I can see in Log that Mikrotik get Mikrotik-Address-List from Freeradius:
but there is no new group “remote_managers” after connection to PPTP.