@dochy said in Captive Portal Bandwidth-Max-Up Down Radius:
have you used captive portal RADIUS pfSense-Bandwidth-Max-Up and pfSense-Bandwidth-Max-Down attributes with any authentication system?
Yes.
This captive portal setting is not used :
7f74b54b-516d-4294-bfa4-f057ae5b90ca-image.png
I've a test user, login 'x' and password 'x' set up in FreeRadius.
No bandwidth limiting.
ed13397e-0f07-489b-9708-f6c085e822b0-image.png
When I use this 'x' account, I get what is available. Right now, the real limit is around 45 Mbytes / sec up and down. That limit is imposed by my very old access points.
Now, I add a up and down limit for this user 'x' :
1b91a13f-beea-483d-b9f6-d054e7b2a3f6-image.png
and test again.
Sure enough, I disconnected the actual 'x' connection first, and re connected using user login 'x'.
Result :
e76b9f63-ba97-4d63-8a13-31394d9171fd-Capture d_ecran . 2023-09-21 a 12.45.09.png
I consider this a "it works".
Other captive portal users are not impacted.
@dochy said in Captive Portal Bandwidth-Max-Up Down Radius:
have many users in Active Directory service and i should control bandwith of each user by groups or something like that.
This is what I would do if I needed to figure this out :
pfSense has a build in authentication system, the default build in User manager.
This one is fine for very basic "login + password" checking.
FreeRadius offers more, as you already can see in the in te captive portal settings page :
e1d3242e-f36e-4f3a-82d1-708d6d6b86b4-image.png
So, an initial identification is done, and further more, every minutes 'accounting' is done.
This accounting is : the user id, and also, MAC address, consumed traffic and much more. All this info is send to FreeRadius, who compares in its own 'tables' (files and/or database) the allowed (max) values.
FreeRadius sends back with a 'granted' or 'refused' answer.
This handling, I want to see this in the code or scripts.
FreeRadius is already a complex animal, but I said ones myself : it can't be that hard, as nearly every ISP, phone company and whatever other access that is metered on earth is using Radius already.
So, it can be done. But this aspect is very little discussed on the Internet.
You want to know how to build a web server ? That's easy, as the day you can read (5 years ?) you can find the info on the net - a zillion times.
A mail server ? Same thing - a bit more complex, as everybody can send mail, but actually very few know what really happens, what is needed.
A domain name server (aka : DNS server) : It's actually very easy, as it is ancient technology from the seventies last century, and didn't really evolve since. Take note that DNS is the biggest subject where people think they know what it is, and are fully wrong.
Radius or an authentication server : ? That's a secret. Just look at the config file (sorry : the entire config folder with xxx files in it) of a Radius server. A mess.
Of course, FreeRadius is open source. Still, you need to understand what you read .... what is needed to be done.
I understand that using the source code as a manual isn't really possible for everybody. But for me it's the only sure way to find out how things are done. It can't fail, lie, can't be wrong, is easy to find.
( and better : if you think it's wrong : don't complain, change it ^^ )
Anyway : I can't tell you what pfSense actually exchanges with the type LDAP server - if pfSense sends the "pfSense-Bandwidth-Max-Up and pfSense-Bandwidth-Max-Down attributes" to the LDAP, then you could see that on the LDAP side : just check (as always !) the log.
Does it interact on it ? => Does it send a 'granted' or 'refused' back to pfSense ones the "pfSense-Bandwidth-Max-Up and pfSense-Bandwidth-Max-Down values go over the set limit ?
I use FreeRadius for one simple (stupid) reason : I wanted to know what the 'Radius' thing was.
My needs, a captive portal so I can handle Free Wifi access for a hotel, works just fine if I was using the build in pfSense user manager.
I don't need to 'bandwidth' user or portal clients, as my 5 hotel APs are actually already limiting each user. The main WAN pipe is a 1 Gbits/sec up and down, so there is enough for everybody.
There are at the most 20 hotel clients connected at any time, as it isn't strictly needed any more these days, I've also 4G / 5G coverage.
Sorry for telling you much, and probably nothing.