From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raileanu Grigore Subject: Re: quick syntax query Date: Mon, 7 Jun 2004 14:06:22 +0300 Sender: netfilter-admin@lists.netfilter.org Message-ID: <20040607140622.3a87f2ec.grisha@unixro.net> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: netfilter@lists.netfilter.org On Mon, 7 Jun 2004 11:53:10 +0100 "Knight, Steve" wrote: > Hi there > > Can one use syntax other than CIDR notation when defining things like > networks? > > i.e. it's common to see > > LAN_RANGE="192.168.0.0/24" > > in rule bases, but I would like to use > > DODGY_RANGE="192.168.0.1-5" > GOOD_RANGE="192.168.0.6-30" > BAD_BAD_RANGE="192.168.31-40" > > > a la `nmap` syntax. > > Is this something netfilter can handle? > > Thanks in advance > > > Steve > patch-o-matic iprange patch have this feature: The base/iprange patch: Author: Jozsef Kadlecsik Status: Works This patch makes possible to match source/destination IP addresses against inclusive IP address ranges. Examples. iptables -A FORWARD -m iprange --src-range 192.168.1.5-192.168.1.124 -j ACCEPT iptables -A FORWARD -m iprange --dst-range 10.0.0.0-10.5.255.255.255 -j ACCEPT -- Best regards, Raileanu Grigore mail: grisha at unixro dot net phone: +40 742759147