Page 1 of 1

Automatic Quota Group Management

Posted: Fri Oct 19, 2012 3:14 am
by bjm
I'm looking at creating a package (feel free to correct me if this isn't technically a package, I'm new to Gargoyle) at allows 'Users' (read NOT ADMIN) to register a device against their account/group. This would allow the management of Quota groups to be a bit more automated. When devices connect to the network for the first time, all traffic would be routed to a login page where they have to register the device against their "account", which would add that devices usage to their overall quota, which would have a limit.

These are roughly the steps/activities that are going to occur. Please note these are not always linear:
  • Trigger event for when a NEW device connects to the network and is provided an IP address.
    • Set's all traffic to route to login page. (Separate from the default Gargoyle one)
    User Logs into Device Registration Page and registers device agains their account
    • Script detects MAC/IP address
    • Creates STATIC DHCP rule
    • Removes IP from restriced routing rule
    • Adds IP to the users quota rule

    User Page (Other tasks they can do from the login page)
    • Add Device
    • Remove Device
    • Reset Password
    • Subscribe to Email for Quota Notifications
There a few other things I have in mind, but these are the main points that I was hoping to get up and running.

I'm new to Gargoyle, only really set it up for a friends share house about 2 months ago. Still trying to figure out some of the coding that's used in Gargoyle as should be able to utilise a number of the scripts already in place to actually do half these tasks.

Just posting this up so if anyone has any info that they think might help me along in this project, they could point me in the right direction. Also if there is something that already does this exact thing, let me know, cause that would be annoying to finish it up and have someone tell me it already exists.

Also if you like the idea let me know too :D

Re: Automatic Quota Group Management

Posted: Sat Oct 20, 2012 6:03 am
by ispyisail
would you mind sharing your code with Eric?


sounds like i could be a good feature for gargoyle?

Re: Automatic Quota Group Management

Posted: Sat Oct 20, 2012 8:16 am
by bjm
Yeah I'll totally be sharing it. That's the whole point. That would defeat the purpose of the GPL otherwise. :P

It may be a while yet, I've got to get my VM working properly, it's not detecting the Virtual NIC, but once that's done, the hardest part should be figuring out how to trigger the first step for when a new deivce connects to the router and get's given an IP address.

Although....now that I think about it....I could just make all traffic divert to the login page unless it's been registered....that would make it easier. Hmmmmmmm.... ok so getting all the traffic, except for the registered devices, will now be the hard part to sort out......excelent!

Re: Automatic Quota Group Management

Posted: Thu Nov 22, 2012 11:57 pm
by daniels
Just posting to show my support for this idea!

We use a TP-Link TL-WR1043ND with Gargoyle to keep track of the flat data usage (as we are capped by our ISP). If everyone had the ability to manage their own devices it would make things very much "set up and forget" for me :-)

Re: Automatic Quota Group Management

Posted: Mon Nov 26, 2012 11:11 pm
by bjm
That's the plan ;)

Haven't touched this over the last 2 weeks due to work and life in general but keen to get back into it this week.

I got NoCat working on my VM OpenWRT which helps cause the fundamentals of how that works is similar (in part) to my master plan. (also ebay bidding on a router I can test with. Hopefully I'll win)

If anyone can give me proper instructions of how to get a gargoyle VM running (or just give me a VM of it working) that would help a lot too as that's actually where I'm stuck. Tried building from Gargoyle image from source but it can't seem to pick up the the NIC drivers. I actually haven't got much of a clue as to what I'm doing, but that's never stopped me having fun before :D