[gentoo-user] Set a network quota per eth device?

2007-06-21 Thread qfpvajdy
Hello,



I own a server in a datacenter which has a limit on the traffic per month. If I 
transfer more data then what has been defined in my contract, I have to pay 
about 1 EUR per Gbyte.

Is there any kind of program or script in Gentoo Linux which detects if for 
example the server transfers more than 10 Gbytes in one day on the network 
device eth0 and then it shut it down for 24 hours or something like this?



Best regards,

saf


-- 
E-Mail sent with anti-spam site TrashMail.net!
Free disposable email addresses: http://www.trashmail.net/
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Set a network quota per eth device?

2007-06-21 Thread [EMAIL PROTECTED]

You can use iptables counters and some scripting on bash. Most of the
people do it by hands, because writing huge billing system is to
comprehensive :)

2007/6/21, qfpvajdy [EMAIL PROTECTED]:

Hello,



I own a server in a datacenter which has a limit on the traffic per month. If I 
transfer more data then what has been defined in my contract, I have to pay 
about 1 EUR per Gbyte.

Is there any kind of program or script in Gentoo Linux which detects if for 
example the server transfers more than 10 Gbytes in one day on the network 
device eth0 and then it shut it down for 24 hours or something like this?



Best regards,

saf


--
E-Mail sent with anti-spam site TrashMail.net!
Free disposable email addresses: http://www.trashmail.net/
--
[EMAIL PROTECTED] mailing list





--
http://lcl.sytes.net:3880
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Set a network quota per eth device?

2007-06-21 Thread Boyd Stephen Smith Jr.
On Thursday 21 June 2007 05:22:21 [EMAIL PROTECTED] wrote:
 You can use iptables counters and some scripting on bash. Most of the
 people do it by hands, because writing huge billing system is to
 comprehensive :)

You could do it that way, but it rather silly since the kernel has all kinds 
of support for traffic control and shaping.

Shorewall may be able to handle the task, and it is fairly friendly.

If shorewall can't do what you need you'll need to look into the CLI to the 
kernel's traffic control/shaping/queuing tables: tc.  Some examples and 
discussion are in the Linux Advanced Routing  Traffic Control HOWTO.  It's 
part of The Linux Documentation Project so it can be found either there [ 
http://tldp.org/HOWTO/Adv-Routing-HOWTO/ ] or at it's own little corner of 
the web [ http://lartc.org/ ].  It's old, but still mostly useful.

I can also send you some scripts built around tc for my own little home 
network that *might* be useful as examples.

Also, foringer:
A: Because it reverses the order of the conversation.
Q: Why is top-posting so annoying?
A: Top-posting.
Q: What's the most annoying thing on mailing list and newsgroups?

-- 
Boyd Stephen Smith Jr. ,= ,-_-. =. 
[EMAIL PROTECTED]  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy   `-'(. .)`-' 
http://iguanasuicide.org/  \_/ 


signature.asc
Description: This is a digitally signed message part.