On Sun, 2002-12-15 at 18:02, David Coello wrote:
> Hi
>=20
> At last i achive to make QOS works limitting bandwidth per port but with=20
> one exception : ftp. I don=B4t know why this port doesn=B4t works (aplies=
the=20
> default rule not the own). Anyone has experience with a similar problem?
Do you know how ftp works?
It uses one control-connection on a static port and dynamic
data-connections. So it's only the control-connection that uses a known
port. It's the data in this control-connection that you probably are
limiting, and this is not what you want.
It is possible to mark all packets that are part of a ftp
data-connection using iptables.
iptables -t mangle -A PREROUTING -m helper --helper ftp -j MARK
--set-mark 1
This will work if you have the ip_conntrack_ftp module loaded or
compiled into your kernel. It will only work for the ports
(control-connection) which ip_conntrack_ftp has been told to listen to.
(default only port 21, change with module option 'ports')
For control-connections on port 21 you use "ftp" to match.
If it's say port 2121 and you've told ip_conntrack_ftp to listen to that
port you should use "ftp-2121" to match.
I hope this helps.
--=20
/Martin
Never argue with an idiot. They drag you down to their level, then beat
you with experience.