Share your knowledge at the LQ Wiki.
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 02-06-2004, 11:23 AM   #1
Comrade Chez
LQ Newbie
Registered: Feb 2004
Posts: 16

Rep: Reputation: 0
Bandwidth limitting Apache - ideas?

Okay, I'm not a complete noob to linux, but I don't think logically and I can't do much I haven't done before. I have Apache 2.0 running nicely on Fedora Core 1, however I want to limit the bandwidth it uses. The machine has an external IP, if this helps/matters.

I have webmin installed, and believe setting up the iptables is the answer, but I'm not sure what I need to do. There are three tables set up, one for blocking packets, one for altering packets, and one for NAT. I think a chain needs to go in the outgoing packets part of the blocking packets section, such that packets with a source TCP port of 80 are blocked if their rate exceeds 20kbytes/sec (or 20 packets/sec, assuming the packet is going to be about 1k)?

Is there an easier way to go about it? Thanks in advance for any help you can provide.
Old 02-06-2004, 11:33 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
This "Wonder Shaper" stuff is pretty cool as far as bandwidth limiting and such. It is pretty involved though.
Old 02-06-2004, 11:38 AM   #3
Registered: Sep 2003
Location: Chicago
Distribution: Slackware 14.1
Posts: 60

Rep: Reputation: 15
well, i wrote a download cgi in c for limiting bandwith (thanks to everyone on these forums that helped me fix minor problems ), but it might not be exactly what your looking for.. however your best bet might be to write a cgi that handles that instead of messing with iptables and blocking packets, if you don't know alot about cgi, i might be able to help you out.

then all you'd have to do to enforce that people use the CGI, is chmod o-r file, and boom, no way to evade the cgi :-D
Old 02-06-2004, 01:48 PM   #4
Comrade Chez
LQ Newbie
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks jtshaw, had a little problem getting hold of iproute2, but seems to have run okay. Will give a thorough test tomorrow
Old 02-07-2004, 05:47 AM   #5
Comrade Chez
LQ Newbie
Registered: Feb 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Ooops... there goes my logical thinking again. Wonder Shaper worked wonders (excuse me), and its limitting bandwidth as expected. Unfortunately its limitting bandwidth universally, which I guess is its aim. What I was trying to achieve was just limitting the upload on Apache, which is causing lag on the counter-strike server run whenever people check their stats.

Fancy pushing me in your direction smoke?

Oops... missed a bit in the readme about setting unimportant traffic ports... I'll give that a whirl first

Last edited by Comrade Chez; 02-07-2004 at 05:51 AM.


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
Apache Limit Bandwidth Boffy Linux - Networking 2 01-02-2005 05:54 AM
Apache Fails About Every 20 Minutes - I'm Out Of Ideas dotnix Linux - Software 1 11-26-2004 04:08 AM
Limitting functions for certain users - Need help! xmdms Programming 1 07-16-2004 09:18 PM
apache Bandwidth Limit genexis Linux - General 0 02-18-2004 04:54 AM
apache wont start... any ideas... Gear_freak2000 Linux - Software 6 06-02-2003 01:12 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:08 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