Re: [LARTC] how can i filter for a range of ports?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 Apr 2003, Adam Schrader wrote:

> how can i filter for a range of ports? I have seen people use 1024:32000
> when saying from port 1024 to 32000 but tc doesnt accept this? can
> somebody tell me how i can do this? -thanks

You cannot easyly do this, but there is a solution:
You can use a mask != 0xffff for ports.
Very probably you must use several lines to cover whole range.
So, as an example, for 1024 -> 1279 (1024 + 256 - 1) you can use
match tcp sport 1024 0xff00.

For 4096 -> 65535 you can use:
match tcp sport 4096 0xf000

I think you get the idea.

Or you can just use marking.

>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more

---
Catalin(ux) BOIE
catab@xxxxxxxxxxxxxxx


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux