Opennds config quota

Hi there,
can any body help me setting quota using opennds
I want to set quota for each device 2.5 GB
when it is reached can not used internet
thanks

https://opennds.readthedocs.io/en/stable/traffic.html#configuring-data-volume-quotas

Hello,
Following this old topic, I have a question regarding quota.

Can i have the sum quota assigned to a user instead of setting download and upload separately?

Thanks Panos

No. Why would you want that?
Just wondering.. .

1 Like

Hey thanks for the answer.

So for example it would be nice to have plans e.g

  • 500MB for 24h . or
  • 500MB until user consumes it.

So the user can have like a "volume allowance" and the system sums the upload + download and deauth the user when the sum of DL+UL reaches the initial balance.

This case will be good if you have volume allowance in your internet service. e.g 5G / Starlink etc
Panos

It would be simple to write your own client checker script.
If you run ndsctl json you will see a list of clients and the data they have used. For each client, calculate the total and if it exceeds the maximum you want, use ndsctl deauth to kick them out.

1 Like

Hello,

I would like a clarification.

Is the client checker script you are referring to a customizable one belonging to the OpenNDS project?

Regardless the above question, can such script be triggered by OpenNDS, or should our solution trigger it e.g. a cron job.

Panos

As I said:

It would be simple to write your own client checker script.

So yes you have to write your own from scratch, but it is quite simple in Ash scripting, or you can use some other interpreter (PHP-cli or python for example) depending on resources on your router.

You can either run it periodically using chron, or have the script loop indefinitely and run it in the background (ie as a daemon).

But the question stands - do you actually need to add upload and download together.

Normally on a public wifi (the most common application of a captive portal), people predominately download some emails, browse a few web sites, stream a video or two, then leave. If they are torrenting up and down, perhaps you should block them all together :wink:

The session duration, data rate and data volume quotas will normally be set based on the capacity of the feed and the maximum number of people using it. The rate limiting of openNDS is very effective as it allows bursting at high rates before throttling back all in real time, so "normal" users doing the "normal" things can have a good user experience, but traffic like you see with torrenting will be always throttled.
The tools are provided by openNDS to enforce an effective fair usage policy.

So yes, sure, you can do what you are asking for, but is it worth the effort?

It could be if you are after monetising your captive portal, but these days a captive portal is used to provide free Internet at a venue to encourage people to visit (for example a coffee shop or a hotel).

A guest at a hotel that cuts them off half way through streaming a movie will probably go elsewhere next time.....