LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 11-30-2002, 09:03 AM   #1
XCaLiBrE
LQ Newbie
 
Registered: Nov 2002
Posts: 1

Rep: Reputation: 0
Bandwidth Download limit


Hi,
I'd like to know how to place a download limit for everyone on my network. So far I have got Linux Mandrake 8.1 running as my internet sharing gateway by NAT.
I would like to place something like 600 megs per user, per month or something like that. It would be preferable for me to do it by IP addresses.
I have read the other HOW-TO's about bandwidth limiting (shaping) but that is not what I am looking for. I am looking for placing a download cap for all my users. If anyone can help me that would be great.
Thanks.
 
Old 12-01-2002, 12:37 PM   #2
clavius
Member
 
Registered: Dec 2002
Location: Romania, Tg-Jiu City
Distribution: Slackware
Posts: 35

Rep: Reputation: 15
Hei,

You have to write own scripts that do what you want.

Just put in netfilter on table nat, POSTROUTING rules that match your packets with desired IPs and input interface.

After that, make a bash script that at every 5 minutes it run:
# iptables -nvL POSTROUTING -t nat | grep IP and process the output
(type iptables -nvL POSTROUTING -t nat to see how if the output formed - 1st and 2nd field is what do you need).

After that, when the value reached 600MBytes, block his IP with iptables.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftpd - how to limit download bandwidth but unlimited upload bandwidth? mpls mikeg Linux - Software 3 08-13-2005 02:52 PM
How limit bandwidth cuencano Linux - Networking 10 07-18-2005 05:57 AM
Limit Bandwidth andy7t Linux - Networking 6 11-30-2004 03:44 AM
Limit bandwidth on Samba objorkum Linux - Software 0 09-08-2003 02:41 AM
bandwidth limit n_sergiu Linux - Networking 5 08-05-2003 06:02 AM


All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration