From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hardik Dalwadi Subject: Re: Defining ip range in a rule Date: Mon, 20 Mar 2006 17:19:34 +0530 Message-ID: <441E96CE.9010809@deeproot.co.in> References: <441E907F.4060107@mmcomputer.hu> Reply-To: Hardik Dalwadi Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <441E907F.4060107@mmcomputer.hu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-bounces@lists.netfilter.org Errors-To: netfilter-bounces@lists.netfilter.org Content-Type: text/plain; charset="us-ascii"; format="flowed" To: McDouglas Cc: netfilter@lists.netfilter.org Hi McDouglas, On Monday 20 March 2006 04:52 PM, McDouglas wrote: > Hi, > > I'd like to ask how to define an ip address range in a rule. I don't > mean using subnet mask but rather for example making a rule which will > block port 110 for the 10.10.2.50-10.10.2.150 ip range. If your kernel is compiled with CONFIG_IP_NF_MATCH_IPRANGE=y then check below Example. iptables -I PREROUTING -t nat -m iprange --src-range ^^^^^^^^^^^^^^^^^^^^^^ 10.10.2.50-10.10.2.150 -p tcp --dport 80 -j DNAT --to ^^^^^^^^^^^^^^^^^^^^^^^^^ 10.10.2.1:3128 Hardik Dalwadi.