All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Shaping only FTP traffic
@ 2001-09-25  4:48 Shanker Balan
  2001-09-25  8:13 ` Ivan Lopez
  0 siblings, 1 reply; 2+ messages in thread
From: Shanker Balan @ 2001-09-25  4:48 UTC (permalink / raw)
  To: lartc

Hello:

I am a bit unclear on shaping FTP traffic only. How do i do it?

This is what i currently have:

# classid 1:100 is a 200Kbit limiter
# filter for matching "ftp-data" (0x14) and "ftp" (0x15) ports
$TC filter add dev eth1 parent 1:0 protocol ip prio 9 u32 match ip \
sport 0x14 0xffff flowid 1:100
$TC filter add dev eth1 parent 1:0 protocol ip prio 8 u32 match ip \
sport 0x15 0xffff flowid 1:100

This does not seem to work. Can anyone provide me with a filter for
catching active and passive FTP connects?

Thank you for your time.

-- 
Emperor Palpatine:
	Everything that has transpired has done so according
	to my design.

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] Shaping only FTP traffic
  2001-09-25  4:48 [LARTC] Shaping only FTP traffic Shanker Balan
@ 2001-09-25  8:13 ` Ivan Lopez
  0 siblings, 0 replies; 2+ messages in thread
From: Ivan Lopez @ 2001-09-25  8:13 UTC (permalink / raw)
  To: lartc

On Sep/25/2001, Shanker Balan wrote:

> Hello:

hi!

> I am a bit unclear on shaping FTP traffic only. How do i do it?

you just filter by ftp-data port (20) and by passive ports range (most ftp daemons gives you the chance to define a determinate range of ports to use in passive mode)

i discourage you from shaping ftp control traffic (21), because of the annoying delay you introduce in the interactiveness of the ftp session

> This is what i currently have:
>
> # classid 1:100 is a 200Kbit limiter
> # filter for matching "ftp-data" (0x14) and "ftp" (0x15) ports
> $TC filter add dev eth1 parent 1:0 protocol ip prio 9 u32 match ip \
> sport 0x14 0xffff flowid 1:100
> $TC filter add dev eth1 parent 1:0 protocol ip prio 8 u32 match ip \
> sport 0x15 0xffff flowid 1:100
>
> This does not seem to work. Can anyone provide me with a filter for
> catching active and passive FTP connects?

this is how i do it using iptables marking and fw tc filter

#for matching ftp-data
iptables -A OUTPUT -o $IF_EXT -p tcp --sport 20 -j MARK 1
#for matching passive ports range that i configured in my ftp daemon
iptables -A OUTPUT -o $IF_EXT -p tcp --sport 5000:5100 -j MARK 1

#and now the tc filters using fw
tc filter add dev $IF_EXT parent 1:0 protocol ip prio 1 handle 1 fw classid 1:100

> Thank you for your time.

ivan

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-25  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-25  4:48 [LARTC] Shaping only FTP traffic Shanker Balan
2001-09-25  8:13 ` Ivan Lopez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.