nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Bandwidth Limit with Iptables

This is a discussion on Bandwidth Limit with Iptables within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Dear Sir I have 1024/512 bandwidth so I want to litmit bandwidth with port. want to use 512/256 with port ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28-06-2009, 03:37 PM
Junior Member
User
 
Join Date: Dec 2008
OS: Fedora, Debian
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
please is on a distinguished road
Default Bandwidth Limit with Iptables

Dear Sir

I have 1024/512 bandwidth

so I want to litmit bandwidth with port.
want to use 512/256 with port 80
want to use 256/128 with port 443
want to use 256/128 with other ports

can I setup with iptables ?
Pls instruction to me

thanks
Reply With Quote
  #2 (permalink)  
Old 30-06-2009, 01:04 PM
kasimani's Avatar
Senior Member
User
 
Join Date: Jul 2006
Location: India, Delhi
OS: CentOS, RedHat, Fedora, Ubuntu
Posts: 151
Thanks: 3
Thanked 1 Time in 1 Post
Rep Power: 4
kasimani is on a distinguished road
Send a message via Yahoo to kasimani
Default

For this task

Put ur webserver behind squid proxy and create delay pools for them

and from Iptables use this so nobody will try to cheat and use a proxy server other than ours. Public proxies usually run on 3128 and 8080 port

Quote:
Originally Posted by kasimani View Post
/sbin/iptables -A FORWARD -s ! 192.168.1.1 -d ! 192.168.1.1 --dport 3128 -p TCP -j DROP

/sbin/iptables -A FORWARD -s ! 192.168.1.1 -d ! 192.168.1.1 --dport 8080 -p TCP -j DROP
must also make sure that nobody will try to cheat and connect to the internet directly
Quote:
Originally Posted by kasimani View Post
/sbin/iptables -A FORWARD -s ! 192.168.1.1 -d ! 192.168.1.1 --dport 80 -p TCP -j DROP

/sbin/iptables -A FORWARD -s ! 192.168.1.1 -d ! 192.168.1.1 --dport 443 -p TCP -j DROP
Put all this in /etc/rc.d/rc.local
Reply With Quote
  #3 (permalink)  
Old 30-06-2009, 02:05 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You can use various things to control bandwidth. Iptables itself can be used to throttle bandwidth. Checkout the following:
  1. Traffic Control HOWTO
  2. A Practical Guide to Linux Traffic Control
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #4 (permalink)  
Old 15-02-2010, 07:02 PM
Junior Member
User
 
Join Date: Feb 2010
OS: Debian
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Jonathy is on a distinguished road
Smile

Hi you can try to use ProteMac Meter.It’s tool record of your network and display your Internet traffic.It’s really good tool.
Reply With Quote
Reply

Tags
iproute , iptables , iptables traffic shaping , linux traffic control , linux traffic shaping


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Bandwidth limit based on MAC address kasimani Proxy Servers 0 02-05-2009 12:22 PM
Sendmail Outgoing Attachment Size limit. nishith Mail Servers 0 15-12-2008 10:04 AM
Someone stole my bandwidth laluvirtual Networking, Firewalls and Security 1 31-05-2008 05:16 PM
postfix rate limit blackhat_hk Mail Servers 3 03-05-2008 07:57 PM
Bandwidth monitoring ssent12 Computer Networking and Internet/broadband 2 25-07-2007 06:19 PM


All times are GMT +5.5. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38