Find the answer to your Linux question:
Results 1 to 2 of 2
I am trying to limit bandwidth of certain ip addresses on my server. I have been doing hours of reading and not getting very far... So far I believe the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    14

    Throttling bandwidth with iptables and tc


    I am trying to limit bandwidth of certain ip addresses on my server. I have been doing hours of reading and not getting very far... So far I believe the iptables command is

    ptables -A PREROUTING -s 178.33.23.44 -t mangle -j MARK --set-mark 2
    ptables -A PREROUTING -s 178.33.23.45 -t mangle -j MARK --set-mark 2
    ptables -A PREROUTING -s 178.33.23.46 -t mangle -j MARK --set-mark 2
    ptables -A PREROUTING -s 178.33.23.47 -t mangle -j MARK --set-mark 2

    and now I just need the tc command to read those marks and limit bandwidth, I have a gigabit connection and would like to limit each of these ip addresses to 10mbit in and out. Can someone please give me the right command?

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    This is a good start for traffic shaping:

    link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •