Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


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

Rep: Reputation: 0
Bandwidth Download limit

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.
Old 12-01-2002, 11:37 AM   #2
Registered: Dec 2002
Location: Romania, Tg-Jiu City
Distribution: Slackware
Posts: 35

Rep: Reputation: 15

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.


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 01:52 PM
How limit bandwidth cuencano Linux - Networking 10 07-18-2005 04:57 AM
Limit Bandwidth andy7t Linux - Networking 6 11-30-2004 02:44 AM
Limit bandwidth on Samba objorkum Linux - Software 0 09-08-2003 01:41 AM
bandwidth limit n_sergiu Linux - Networking 5 08-05-2003 05:02 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:57 PM.

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