All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] how can i filter for a range of ports?
Date: Wed, 16 Apr 2003 16:41:11 +0000	[thread overview]
Message-ID: <marc-lartc-105051151221033@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105031449822405@msgid-missing>

On Wednesday 16 April 2003 13:14, Mattias Ahnberg wrote:
> >> "AS" = Adam Schrader <schrader2k2@yahoo.com> writes:
>
> AS> how can i filter for a range of ports? I have seen people use
> AS> 1024:32000 when saying from port 1024 to 32000 but tc doesnt
> AS> accept this? can somebody tell me how i can do this? -thanks
>
> iptables -A INPUT -p tcp --dport 1024:65535 -j ACCEPT
>
> Should do what you want. iptables is very limited in defining ranges,
> multiple hosts and similar ranges compares to ipfw2. I hope this will
> change sometime in the future since it would highly simplify the
> definitions of large rulesets.
There is an iptables patch to do this :
http://www.netfilter.org/documentation/pomlist/pom-base.html#mport

Example :
iptables -A FORWARD -p tcp -m mport --ports 23:42,65

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

      parent reply	other threads:[~2003-04-16 16:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-14 10:00 [LARTC] how can i filter for a range of ports? Adam Schrader
2003-04-14 10:19 ` Catalin BOIE
2003-04-16 11:14 ` Mattias Ahnberg
2003-04-16 16:41 ` Stef Coene [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105051151221033@msgid-missing \
    --to=stef.coene@docum.org \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.