[olug] Traffic Sahping and Bandwidth Throttling

Nate Rotschafer writetogenius at hotmail.com
Wed May 1 21:14:36 UTC 2002


I'm using 2.4.18-ac3-htb (aka the ac patch tree with the htb patch tree 
included).  No the challenging part is I just want it bound to eth0 (not by 
ip) and if it is on the subnet 66.37.236.xxx or 66.37.237.xxx I want it 
marked as 2 else marked as 1.  What this will then allow is for the htb 
queues that I have set-up to throttle based on whether it is "internet" 
traffic of "LAN traffic" because obviously the LAN doesn't go out the pipe.

Thanks,
Nate


>From: "Matthew G. Marsh" <mgm at midwestlinux.com>
>Reply-To: olug at olug.org
>To: olug at olug.org
>Subject: Re: [olug] Traffic Sahping and Bandwidth Throttling
>Date: Wed, 1 May 2002 13:50:03 -0500 (CDT)
>
>On Wed, 1 May 2002, Nate Rotschafer wrote:
>
> > Actually I'm using HTB right now and it does limit it but I need to get 
>to a
> > point where I understand how to use iptables to mark packets to 
>determine
> > what the HTB queue should do with the packets.
>
>From the machine itself (asuming the eth0 is egress) you can do:
>
>iptables -t mangle -A OUTPUT -s 192.168.1.1 -d 1.1.1.1  \
>	-j MARK --set-mark 1
>
>This would nfmark all packets outbound from internal processes (processes
>that run in the process space of the machine itself) where the internal
>process is bound to 192.168.1.1 and sending to 1.1.1.1. What is even
>cooler (although YMMV as I have not really used this) is to use the
>experimental Owner match from NetFilter as in:
>
>iptables -t mangle -A OUTPUT -m owner --uid-owner {my apache UID} \
>	-j MARK --set-mark 2
>
>Basically you need kernel >= 2.4.17 an iptables >= 1.2.5 for either of
>these to work. Output table mangle is only recent (with the inclusion in
>2.4.18 of Brad's mangle5hooks)
>
>'k?
>
> > Thanks,
> > Nate
> >
> > "Only those who think know, but those wo know always think."
> > Nate Rotschafer
> > Millard West High School
> > Omaha, NE
>
>--------------------------------------------------
>Matthew G. Marsh,  President
>Paktronix Systems LLC
>1506 North 59th Street
>Omaha  NE  68104
>Phone: (402) 932-7250
>Email: mgm at midwestlinux.com
>WWW:  http://www.midwestlinux.com
>--------------------------------------------------
>
>
>
>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>
>For help contact olug-help at olug.org - run by ezmlm
>to unsubscribe, send mail to olug-unsubscribe at olug.org
>or `mail olug-unsubscribe at olug.org < /dev/null`
>(c)1998-2002 OLUG http://www.olug.org
>
>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>




"Only those who think know, but those wo know always think."
Nate Rotschafer
Millard West High School
Omaha, NE


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

For help contact olug-help at olug.org - run by ezmlm
to unsubscribe, send mail to olug-unsubscribe at olug.org
or `mail olug-unsubscribe at olug.org < /dev/null`
(c)1998-2002 OLUG http://www.olug.org

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_




More information about the OLUG mailing list