Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Hardik Dalwadi <hardik@deeproot.co.in>
To: McDouglas <mcdouglas@mmcomputer.hu>
Cc: netfilter@lists.netfilter.org
Subject: Re: Defining ip range in a rule
Date: Mon, 20 Mar 2006 17:19:34 +0530	[thread overview]
Message-ID: <441E96CE.9010809@deeproot.co.in> (raw)
In-Reply-To: <441E907F.4060107@mmcomputer.hu>

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.


  parent reply	other threads:[~2006-03-20 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 11:22 Defining ip range in a rule McDouglas
2006-03-20 11:44 ` John A. Sullivan III
2006-03-20 11:49 ` Hardik Dalwadi [this message]
2006-03-20 12:48 ` Askar Ali

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=441E96CE.9010809@deeproot.co.in \
    --to=hardik@deeproot.co.in \
    --cc=mcdouglas@mmcomputer.hu \
    --cc=netfilter@lists.netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox