Creating tickets

Report issues relating to bandwith monitoring, bandwidth quotas or QoS in this forum.

Moderator: Moderators

Post Reply
Joseph Mariki
Posts: 1
Joined: Wed Jan 06, 2016 7:29 pm

Creating tickets

Post by Joseph Mariki »

Hello Gargoyle. I have a small project at school and I will need your system. My question is, does this software cloud managed? Second question is, can I create and print tickets or vouchers with bandwidth limits? Thanks in advance. Joseph.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Creating tickets

Post by Lantis »

Hi Joseph,

The software is managed via the web interface of the router. There is no "cloud" management so to speak.

There is no built in way to print tickets or vouchers with bandwidth limits.
I can think of a few ways of implementing this in a rather crude way. Can i get more details on your project? What exactly are you trying to achieve. I'd love to help you, without doing it all for you :).
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

compever
Posts: 3
Joined: Fri Jun 05, 2020 1:56 am

Re: Creating tickets

Post by compever »

Hi Lantis,

I realise that is resurrecting an old thread, but I thought that was the best place to ask the question.

I am very interested in creating a ticketing system for Gargoyle, and your “very crude way” would be a great start. :-)

Are you still willing to share that knowledge?
Last edited by compever on Fri Jun 05, 2020 2:12 am, edited 1 time in total.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Creating tickets

Post by Lantis »

Sure.

So the basic goal is to lock a device to an IP. if you can do that, the quotas etc are trivial.
My crude method involved registering the device ahead of time by MAC Address. Use this to assign a static IP and then establish required quotas.
Then the user just needs to be given the wifi password and they're in.

I imagine this all happening just before the ticket generation phase.

"Please enter your MAC Address to get X MB of data"

Does that point you in the right direction?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

compever
Posts: 3
Joined: Fri Jun 05, 2020 1:56 am

Re: Creating tickets

Post by compever »

For our usage getting the user to enter their MAC address isn't feasible, but I can get that information from the logs and script the application of a quota. Thank you for pointing me in that direction.

Where my knowledge is lacking is in how to apply a quota via script. I could manually apply a quota and reverse engineer how it was done, but if you already know how that would be much better. :)

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Creating tickets

Post by Lantis »

Honestly i'd just be doing the same thing to explain it to you. Best if you test it locally and understand the ins and outs of how it works.

The only pointers I can give would be:
- Quotas are stored in /etc/config/firewall
- They are applied to the system by restore_quotas
- restore_quotas is typically called via /usr/lib/gargoyle_firewall_util/gargoyle_firewall_util.sh which does some bootstrapping and other iptables setup first
- There are some extra flags which are set initially in /etc/config/firewall, and then deleted by restore_quotas after dealing with them (i think the "id" field should be left out, and then restore_quotas generates you one. You can supply it yourself, just make sure no clashes) (You should set option "ignore_backup_at_next_restore" to "1" when first creating a quota so it doesn't attempt to load historical data. restore_quotas will handle and remove this option after processing)


Oh, and if you come up with anything interesting out of this journey, please do share it back with us. It would be interesting to see at the very least.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

compever
Posts: 3
Joined: Fri Jun 05, 2020 1:56 am

Re: Creating tickets

Post by compever »

That was heaps for me to work with. Thank you.

I will get working on this. As I am doing it in my spare time (aren't we all) it may take a while, but I will certainly share what I come up with.

Post Reply