View Full Version : Using IPTable to throttle data transfer on portXYZ

13-11-2003, 08:26 AM
Here's what Im after:
Im running iptables on my Slack 9.1 PC which currently has two NIC's, one from the router to my PC, the other from my PC to the LAN. Im the gateway between the lan and the internet... :-)

Now, Im wanting to throttle ports XYZ to limit the speed on them so that myself, and others dont go over the JetStream Starter cap we have.

How would i go about doing this?

Is it possible to just limit outgoing or just incoming on certain ports too?



13-11-2003, 06:12 PM
what data cap have you got?

13-11-2003, 06:24 PM
10 Gigs International, unlimited national...
And dont suggest DC++, coz:
A. I run linux and already have a linux client, and:
B. I wanna throttle other ports

13-11-2003, 06:33 PM
"tc" will do per interface limits, i'm not sure about per port limiting.

A good place to look would be the Linux Advanced Routing & Traffic Control HOWTO.

13-11-2003, 06:35 PM
yeh i now that you are running linux,

your are running slackware 9.1!

(you told me, remember...)

I have a fealing that you probably won't go over 10 gig a mount.

i did 7 gig last mounth.....

and ive got a 10 gig cap toooo

13-11-2003, 06:42 PM
Ive done roughly 16 gigs so far total this month... That's a guesstimate coz Ihug havent updated their page since the 11th :-(

13-11-2003, 07:52 PM
Ah, well... you probably need to run a bandwidth measurer thing.

For accuracies sake, it must be installed on the final computer that traffic goes in and out of, which I think in your case is your computer, unless there's another one between that and the router/switch/whatever it is.

But for even more accurate results, you should install it between the wall connection and your router/switch/etc, and have that computer not do anything except count bandwidth - otherwise it won't be counting traffic blocked by the switch/router/I'm getting sick of typing switch, router, etc.