How to limit bandwitdth for user?

Is there a way to make 10 different PPPoE accounts and every user should connect with his unique username and password to MikroTik, but they should have monthly bandwitdth capped (to the internet, through the router).

Example:
PPP account “Dakky” should have monthly limit set to 2 GB
PPP account “George” should have monthly limit set to 512 MB
etc.

Of course bandwidth is upload + download.
I’m guessing that MikroTik has some sort of counters, and that the script could be made to reset the counters every 30. in the month…

I’ve been told that I should do this by configuring a Radius server which should look into the database for every user who connects to router through PPPoE…

On the other hand, that variant seems too complex to do…

And I am a pretty big newbie at configuring router… (friends help me most of the things get done)

Thanks in advance
Dakky

MT can’t do this internally… What will happen to these counters if the MT reboots???

Use a Database, and tie it in with Radius

it is not time critical and must-not-be-done…

what im trying to say - if it reboots, who cares :smiley:

and im pretty sure it wont reboot, after all it is on the ups and has over 1500 hrs uptime for now.

please give me a clue how to do it without a radius and a db…

tnx!

  1. Setup FR
  2. Get it to talk to MT
  3. Make sure your accounting works :slight_smile:

Then you have a couple of options… Look at rlm_exec or rlm_perl and create custom processes which checks and validates the bytes used from accounting data, and…

  • If the user reaches the bytes limit while he’s connected, disconnect him
  • If the user attempts to authenticate and is over the limit, deny the authentication request…

Relatively simple… If you have problems with the perl stuff, post and we’ll see what to do


C

  1. Setup FR
  2. Get it to talk to MT
  3. Make sure your accounting works :slight_smile:

Then you have a couple of options… Look at rlm_exec or rlm_perl and create custom processes which checks and validates the bytes used from accounting data, and…

  • If the user reaches the bytes limit while he’s connected, disconnect him
  • If the user attempts to authenticate and is over the limit, deny the authentication request…

Relatively simple… If you have problems with the perl stuff, post and we’ll see what to do


C

RADIUS + DB is only in case it reboots (just in case) so you get precise infromation about users bandwith

if you are sure it wont reboot, then you can simply create script that reads all data needed by you and sends as email afterwards - resets counters for users. :unamused:

:exclamation: better use RADIUS

MT itself can deny my login if I transferred more than 1GB of data?

I highly doubt it… There’s no way to interact with a authentication process by using scripts.

Ok, but to set up Radius, i need to know linux (at least basics) which im pretty sure that i dont know…

Do you guys know for any online tutorial on setting Radius under Linux or under Windows… and for configuring the MT to use the Radius..

thanks