Skip to contentSkip to conversation

Traffic Accounting on Small System and User Limits.

DISCUSSION Bo Yang 2 participants 4 messages Sep 29, 2006 1 message not in the archive

lore
Share & tools
lore

Bo Yang

author
#1 lore raw
In reply to a message not in the archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Don Gould :

Quoted 14 lines

This is a requirement for a small system I'm building for a local motel to be able to give internet access away free to their customers.

I have looked in to a bunch of different stuff but don't know the best way to go. I know this might not even be the right list to ask on, so please be kind. :)

OPEN SOURCE GPL PLEASE - I have already done some work on some systems to get me what I want... all the work I'm doing is on open
source stuff and is/will be made available back to the community,
so, if you have a need for this work as well but can't help, then please feel free to drop me a line and I'll keep you informed.

Quoted 4 lines

1. I want to keep a record of the amount of data each user uses over a given amount of time. I know the users IP number and their MAC address. I modified DNSMasq [1] to tell me this each time the user issues a DHCP request.

If you just want to get how many bytes a user used in a given range of time , iptalbes can do it very nicely !
iptables -t filter -A forword -s {your user ip}

Quoted 3 lines

2. It is proposed that each MAC will be given 50mb of data to use. After this the user/MAC will have to be authorised to have more.

You can use iptables quota module to accomplish this .

Quoted 5 lines

The servers I'm using will run Debian Saige and are only small - p2
or 3 with ~30 to 64mb ram and 2 - 3gb hard disk. Each server only has to look after < 50 clients and in most cases wouldn't get more than 10 using it at a time.

Oh , bad hardware ~

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFHKdP7tZp58UCwyMRAtsFAKC7PQ2zlFtdbwtTAtuPOcRe345auwCaA8aj rKiCK4X1fDgjZT6euB0b7nQ=
=g8nB
-----END PGP SIGNATURE-----

#2 lore raw
Quoted 7 lines · Bo Yang
Quoted 4 lines

1. I want to keep a record of the amount of data each user uses over a given amount of time. I know the users IP number and their MAC address. I modified DNSMasq [1] to tell me this each time the user issues a DHCP request.

If you just want to get how many bytes a user used in a given range of time , iptalbes can do it very nicely !
iptables -t filter -A forword -s {your user ip}

Thanks very much. I'll read up on that.

Quoted 3 lines
Quoted 2 lines

2. It is proposed that each MAC will be given 50mb of data to use. After this the user/MAC will have to be authorised to have more.

You can use iptables quota module to accomplish this .

I'll read up on that as well.

Quoted 5 lines
Quoted 4 lines

The servers I'm using will run Debian Saige and are only small - p2
or 3 with ~30 to 64mb ram and 2 - 3gb hard disk. Each server only has to look after < 50 clients and in most cases wouldn't get more than 10 using it at a time.

Oh , bad hardware ~

Yes. Case of reusing something the customer already has. My mission is to get motels in my area giving away data to their customers for free in the hope that I can then get interest from the city to do the same.

I want to show the advantages of giving tourists free access to communications so they can show off our country to the world while they're hear.

However we have to pay for data so I can't just do a 'free for all'.

Some motels charge their customers and are paying for better hardware. I'm trying to find a balance.

Thank you very much again for your help.

Cheers Don

Signature · 4 lines
Don Gould
www.thinkdesignprint.co.nz - www.tcn.bowenvale.co.nz -
www.bowenvale.co.nz - www.hearingbooks.co.nz - SkypeMe:
ThinkDesignPrint - Good ideas:  www.solarking.co.nz
#3 lore raw
In reply to Bo Yang
Quoted 3 lines · Bo Yang

If you just want to get how many bytes a user used in a given range of time , iptalbes can do it very nicely !
iptables -t filter -A forword -s {your user ip}

Ok, I fried this bit...

I assumed you'd done a type o and 'forword' should be forwArd.

[root@bowenvale ~]# iptables -t filter -A forward -s 192.168.2.148
iptables: No chain/target/match by that name

I'm sure I'm not understanding something, sorry if I'm being dumb.

Cheers Don

Signature · 2 lines
Don Gould
www.thinkdesignprint.co.nz - www.tcn.bowenvale.co.nz - www.bowenvale.co.nz - www.hearingbooks.co.nz - SkypeMe: ThinkDesignPrint - Good ideas:  www.solarking.co.nz