Rate limiting bandwidth per IP

7,003

Solution 1

You need to block things at level 7 of the OSI model. Have a look at this implementation you can install on Linux:

http://l7-filter.sourceforge.net/

Solution 2

If you are coming at this from the point of a complete newbie, then much of the documentation and HowTo tutorials are going to be at a too complex level.

It seems like you already have the wireless connection shared, so that is a good start.

However what you are try to do is called traffic shaping, and generally involves some level of rate-limiting and protocol blocking.

(Basically this is a very hard battle, and one that you can't win, you can only lose less badly. basically there are always ways around the restrictions that you apply, but you can try and make sure that at least some HTTP and SMTP/IMAP traffic gets through)

You probably would benefit from implementing some free software like wifidog which allows you to manage and monitor the users on your connection.

Basically, I would suggest the following;

  1. Don't block anything, just throttle it right back (blocking encourages users to find naughty work-arounds)
  2. You won't be able to block flash-got, but you can manage per MAC address limits, or per connection limits
Share:
7,003

Related videos on Youtube

Yohan
Author by

Yohan

Updated on September 18, 2022

Comments

  • Yohan
    Yohan over 1 year

    First, I am not that good with computer. I even had problem with Windows PC. Right now I own a restaurant which happened to offer free internet. My ISP has my connection setup using a Ubuntu 11.1 box. IP Address is 192.168.1.16 with netmask 255.255.0.0, dns is 192.168.1.1 and gateway is 192.168.1.1.

    My problem is that my customers complains all day about slow network. When I received that kind of complain, the first thing came to my mind is to scout my area and find out who is the culprit, and ask him not to waste our bandwidth.

    Now, it is getting bored scouting people around, and I need to implement to my Linux box to limit bandwidth. I don't care if their provider can't be faster, but I want to limit 70kbit for each person. More annoying are people who use flashget and torrents. Usually they consume the biggest bandwidth.

    My question, how can I limit that? Please guide me in easy way. I've spent few days reading documentation for tc, but I haven't understood a thing. I am using Ubuntu 11.10

    Basically, I want all my customers to get 70kbps each, no matter what.

    • Robin Alvarenga
      Robin Alvarenga about 12 years
      I'm afraid this website is for IT professionals. As said in the FaQ.
    • tombull89
      tombull89 about 12 years
      Hi, Yohan. While I appriciate your issue you may be better asking over at a sister site of ours such as SuperUser - ServerFault is meant for system administrators and desktop support professionals. This should get closed or migrated shortly - don't repost it there yet. However, if you know, is the "Linux 11.1" box what you access the internet through, or is there a router involved somewhere else? And if you know that, what is the make and model of the router?
    • brownian
      brownian about 12 years
      You can use transparent proxying, you can use hashed filtering with tc --- in any way here is no quick and simple answer, I believe.
    • Evelina
      Evelina about 12 years
      I think a simpler answer is to use something like Tomato, running on a suitable router such as WRT54G. Tomato provides quite good QoS features and is easy to set up through a GUI - more appropriate for a home/restaurant scenario. Or maybe use something Tomato-like on Ubuntu.
  • Yohan
    Yohan about 12 years
    what is mac address? and how can I do that? I don't think connection limit is suitable for me, since flashgot can open multiple connections at once. If one connection at 32k, then if flashgot opens 10 connection they would have 320kbps.
  • Yohan
    Yohan about 12 years
    er... sorry, I don't understand.. the only I understand is that link shows about classifying application? Is that correct? If that so, how can I blocked application like flashgot or internet download manager?
  • Yohan
    Yohan about 12 years
    update: after doing a little searching I know what mac address is.. It is some kind like IP but written in hardware, correct? How can I limit per mac address?